Skip to content

Instantly share code, notes, and snippets.

@smorcuend
Created December 5, 2015 20:58
Show Gist options
  • Save smorcuend/ac863db226c15e0ac113 to your computer and use it in GitHub Desktop.
Save smorcuend/ac863db226c15e0ac113 to your computer and use it in GitHub Desktop.
git commands aliases
## GIT ALIASES ##
alias gitb='git branch -a -v'
alias gits='git status'
alias gitd='git diff'
alias gita='git add'
alias gitph='git push'
alias gitl='git log'
alias gitr='git remote'
function gitp {
if [ -z "$1" ]; then
git pull
else
git pull $1 $2
fi
}
alias gitcl='git clone'
# gitch => git checkout master
# gitch bugs => git checkout bugs
function gitch {
if [ -z "$1" ]; then
git checkout master
else
git checkout $1
fi
}
# gitco => git commit -m "..."
alias gitco='git commit -m'
alias gitca='git commit --amend'
alias gitrh='git reset --hard origin/master'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment