以下是一些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
查看服務狀態。