cleaner merges for everyone
let's merge conflicting branch feature
into master
$ 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.
either fix the conflict manually by editing codefile.js, or use
$ git checkout --ours codefile.js
master
$ git checkout --theirs codefile.js
feature
then, continue as you would normally merge
$ git add codefile.js
$ git merge --continue
[master 5d01884] Merge branch 'feature'
let's rebase conflicting branch feature
over master
$ git checkout feature
$ git rebase master
First, rewinding head to replay your work on top of it...
Applying: a commit done in branch feature
error: Failed to merge in the changes.
...
either fix the conflict manually by editing codefile.js, or use
$ git checkout --ours codefile.js
master
$ git checkout --theirs codefile.js
feature
then, continue as you would normally do
$ git add codefile.js
$ git rebase --continue
Applying: a commit done in branch feature