git 冲突解决

2018-11-27  本文已影响0人  尼莫nemo

当前分支和master分枝分别有更新的时候

$ git merge feature1
Auto-merging readme.txt
CONFLICT (content): Merge conflict in readme.txt
Automatic merge failed; fix conflicts and then commit the result.
$ git status
On branch master
Your branch is ahead of 'origin/master' by 2 commits.
  (use "git push" to publish your local commits)

You have unmerged paths.
  (fix conflicts and run "git commit")
  (use "git merge --abort" to abort the merge)

Unmerged paths:
  (use "git add <file>..." to mark resolution)

    both modified:   readme.txt

no changes added to commit (use "git add" and/or "git commit -a")

手动解决冲突后再次提交
git add readme.txt
删除分支$ git branch -d feature1

上一篇 下一篇

猜你喜欢

热点阅读