Created
April 10, 2013 16:56
-
-
Save iolloyd/5356431 to your computer and use it in GitHub Desktop.
accepting the remote file version during merge conflicts when rebasing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git pull --rebase origin <yourbranch> | |
... some merge conflict. Let's say the file is called foo/lika.py | |
git co --theirs foo/lika.py | |
git add foo/lika.py | |
git rebase --continue | |
That's it |
a more comprehensive shortcut is to add this to your .bashrc, .zshrc or .profile .. alias git-theirs="git co --theirs $1; git add $1; git rebase --continue". usage: git-theirs some/file.py
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
co => checkout. to add it in your git shortcuts, just type git config alias.co checkout