第一步: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 - 回到上一个分支,吓死宝宝了
博客介绍了在GitLab进行分支合并的步骤,包括获取并检出分支、本地审查更改、合并分支并解决冲突、推送合并结果。但在推送时因本地主分支代码非最新而遇问题,切回主分支更新后无法返回临时分支,最终找到方法解决。
1208

被折叠的 条评论
为什么被折叠?



