第一步 关闭服务
/etc/init.d/gitlab stop
第二部 更新代码
cd /home/gitlab/gitlab
git pull origin stable
# !!! Config should be replaced with a new one. Check it after replace
cp config/gitlab.yml.example config/gitlab.yml
# Install libs
bundle install --without development test
# update db
bundle exec rake db:migrate RAILS_ENV=production
第三步 启动服务
/etc/init.d/gitlab start
本文转自 ppabc 51CTO博客,原文链接:http://blog.51cto.com/ppabc/999725