第一步:Fetch and check out the branch for this merge request
git fetch origin
git checkout -b 你的分支 origin/你的分支
第二步: Review the changes locally
第三步:Merge the branch and fix any conflicts that come up
git fetch origin
git checkout origin/master
git merge --no-ff 你的分支
第四步:Push the result of the merge to GitLab
git push origin master
这时就出现问题了
由于我本地的主分支不是最新的代码,所以无法推送
显示:
提示:更新被拒绝,因为推送的一个分支的最新提交落后于其对应的远程分支。
提示:检出该分支并整合远程变更(如 ‘git pull …’),然后再推送。
#切回主分支git pull了 一下
#这时我发现回不去了…因为之前的是临时分支
#多方尝试发现可以使用git checkout -
回到上一个分支,吓死宝宝了