Created
July 29, 2013 19:37
-
-
Save minrk/6107101 to your computer and use it in GitHub Desktop.
preserving completion for git aliases.
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
# define some aliases | |
alias m="git checkout master" | |
alias mp="git checkout master && git pull" | |
alias ci="git commit" | |
alias c="git checkout" | |
alias co="git checkout" | |
alias b="git checkout -b" | |
alias pr="git push mine && hub pull-request" | |
alias uncommit="git log -1 && git reset HEAD^1" | |
# register existing git completions for these aliases if git-completion is available | |
if [ ! -z "$(declare -f __git_complete)" ]; then | |
__git_complete ci _git_commit | |
__git_complete c _git_checkout | |
__git_complete co _git_checkout | |
__git_complete mp _git_pull | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For @ivanov, from SO