以下是一些GitLab在Ubuntu上的使用技巧:
curl
、openssh-server
等,添加GitLab仓库,再通过apt
安装GitLab CE或EE,可通过修改/etc/gitlab/gitlab.rb
配置文件设置外部URL等参数,用sudo gitlab-ctl reconfigure
使配置生效。git clone
克隆仓库,git add
、git commit
和git push
进行代码提交,git pull
获取最新代码,通过创建分支、切换分支、合并分支等操作进行项目管理。sudo gitlab-ctl start
、sudo gitlab-ctl stop
、sudo gitlab-ctl restart
等命令管理GitLab服务,用sudo gitlab-ctl status
查看服务状态。