$ git push origin master To /home/fan/repo/code/../a.git/ ! [rejected] master -> master (fetch first)
push失败,版本落后,提示要fetch
$ git fetch origin $ git merge origin/master Auto-merging a.txt CONFLICT (content): Merge conflict in a.txt
发生冲突
选择修改,解决冲突
git checkout --ours a.txt git checkout --theirs a.txt
提交处理后的文件,再push
git add a.txt git commit -m ‘fix conflicts‘ git push origin master:master
时间: 2024-10-31 18:41:44