1、
Updating 7c9e086..936acac
error: The following untracked working tree files would be overwritten by merge:
Common/HFHttpRequest/HFHttpRequestParameters.h
Common/HFHttpRequest/HFHttpRequestParameters.m
Please move or remove them before you can merge.
Aborting
解决方法:
git clean -d -fx
参考博客:git Please move or remove them before you can merge. 错误解决方案
2、
Auto Merge Failed; Fix Conflicts and Then Commit the Result.
解决方案:
git reset --hard <commit-id>
这个命令会将当前分支的 HEAD 指针指向指定的 commit-id,同时将工作区和暂存区的内容都回退到指定版本的状态。注意,这个操作是不可逆的,回退后之前的提交记录将被删除。
参考博客:git pull报错:Auto Merge Failed; Fix Conflicts and Then Commit the Result.
3、每次git pull 后都要merge一次,但是merge 又没有新增任何内容。
1)删除本地分支:
git branch -D <分支名> #-D表示强制删除未完全合并的分支
2)拉取远端分支
git checkout <分支名>
4、squash and merge
在merge时会合并多个commit
5、通过 git rebase
合并多次commit记录;
解决 当开发分支落后于master分支,把开发分支merge request到master分支时产生冲突。