举例:
# 主分支下有 A.txt 文件,内容如下:
name='tom'
# 然后我新建了一个分支 hello ,hello分支下也会有 A.txt,内容如上
# 接着我开始了 hello 分支的开发 ,新建了一个 B.txt 准备推送到 hello 分支
# 但是这时候有其他人修改了主分支 A.txt 的内容并且进行了推送,内容如下:
name="jj"
# 然后我开始了推送
git add .
git commit -m '新建B.txt'
git push origin hello
# 开始合并到主分支,并推送
git checkout master
git merge origin/hello
# 就在这一步告诉我报错了,该怎么解决
Auto-merging A.txt
CONFLICT (content): Merge conflict in A.txt
Automatic merge failed; fix conflicts and then commit the result.
先拉取,再推送, 自己解决冲突