Last active
September 12, 2016 20:03
-
-
Save kenny-evitt/e93a7e5d33babbbbe36161f76c219c8f to your computer and use it in GitHub Desktop.
Git alias to save 'ours' and 'theirs' versions of a merge-conflicted file
This file contains 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
# Because Git has really good Bash completion support, naming the alias `save-ours-theirs` is just as easy to type but a *lot* more readable. | |
# Add to Git config file, e.g. *~/.gitconfig* | |
# Example: `git sot Static\ Data/dbo.TABLE.sql` | |
[alias] | |
sot = "!f(){ git show :2:\"$1\" > ours && git show :3:\"$1\" > theirs; }; f" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment