Jenkins合并代码Git报错处理过程
#jenkins合并代码时候报错内容
#10:36:08 ! [rejected] HEAD -> master (non-fast-forward)
#10:36:08 error: failed to push some refs to 'http://*********/zhenghe/zhenghe-gateway.git'
#10:36:08 hint: Updates were rejected because a pushed branch tip is behind its remote
#10:36:08 hint: counterpart. Check out this branch and merge the remote changes
#10:36:08 hint: (e.g. 'git pull') before pushing again.
#10:36:08 hint: See the 'Note about fast-forwards' in 'git push --help' for details.
#解决方法
使用Jenkins帐号进入workspace,执行一下命令。
git checkout release git pull http://******/zhenghe/zhenghe-gateway.git git checkout master git merge release git push http://********/zhenghe/zhenghe-gateway.git
再次build,合并成功