Skip to content

Instantly share code, notes, and snippets.

@amirnissim
Last active December 26, 2015 00:49
Show Gist options
  • Save amirnissim/7066956 to your computer and use it in GitHub Desktop.
Save amirnissim/7066956 to your computer and use it in GitHub Desktop.
git aliases
# checkout a branch by partial name
go = "!sh -c \"if [ $(git branch | grep $1 | wc -l) -gt 1 ]; then git branch | grep $1; else git checkout $(git branch | grep $1); fi\""
# open conflicted files in editor
revise = !sh -c \"git diff --name-only | uniq | xargs subl\"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment