git merge
$ git checkout master
$ git merge feature
Auto-merging Document
CONFLICT (content): Merge conflict in codefile.js
Automatic merge failed; fix conflicts and then commit the result.
如果我们要保留 Master
git checkout --ours codefile.js
保留 Feature
git checkout --theirs codefile.js
接下来
$ git add codefile.js
$ git merge --continue
[master 5d01884] Merge branch 'feature'
git rebase
git rebase 类似 ,将merge 改rebase 即可
最后一步
$ git add codefile.js
$ git rebase --continue
Applying: a commit done in branch feature