Skip to content

Instantly share code, notes, and snippets.

@kgadek
Created February 2, 2015 18:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kgadek/bba21d1a47d0cbd26b72 to your computer and use it in GitHub Desktop.
Save kgadek/bba21d1a47d0cbd26b72 to your computer and use it in GitHub Desktop.
❯ git status
On branch hjkl
nothing to commit, working directory clean
❯ cat A.md
hjkl
❯ git merge qwer
Auto-merging A.md
CONFLICT (content): Merge conflict in A.md
Automatic merge failed; fix conflicts and then commit the result.
✘ konrad@haswellpro ⮀ ⭠ hjkl± ⮀ ~/tmp/arz ⮀
❯ cat A.md
<<<<<<< HEAD
hjkl
=======
qwer
>>>>>>> qwer
❯ git checkout --ours A.md
❯ cat A.md
hjkl
❯ git status
On branch hjkl
You have unmerged paths.
(fix conflicts and run "git commit")
Unmerged paths:
(use "git add <file>..." to mark resolution)
both modified: A.md
no changes added to commit (use "git add" and/or "git commit -a")
❯ git add A.md
❯ git status
On branch hjkl
All conflicts fixed but you are still merging.
(use "git commit" to conclude merge)
nothing to commit, working directory clean
❯ cat A.md
hjkl
❯ git checkout --theirs A.md
❯ cat A.md
hjkl
❯ git status
On branch hjkl
All conflicts fixed but you are still merging.
(use "git commit" to conclude merge)
nothing to commit, working directory clean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment