Skip to content

Instantly share code, notes, and snippets.

@matthieua
Created October 30, 2013 15:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save matthieua/7234939 to your computer and use it in GitHub Desktop.
Save matthieua/7234939 to your computer and use it in GitHub Desktop.
## Git
alias gb='git branch'
alias gd='git diff'
alias gdm='git diff master'
alias gl='git log'
alias ga='git add'
alias gco='git checkout'
alias gc='git commit -v'
alias gca='git commit -v -a'
alias gba='git branch -a'
alias gp='git push origin $(current_branch)'
alias g='git status'
alias gre='git rev-parse HEAD'
alias eg='subl .git/config'
alias ungit="find . -name '.git' -exec rm -rf {} \;"
alias git="hub"
function gg() {
git commit -m "$*"
}
@attilaolah
Copy link

I just realised another option would be to alias g='git' and then set up these as git aliases in .gitconfig. It does require typing an extra space, but shows the original with tab completion.

But then you already have g='git status'.

@matthieua
Copy link
Author

hmm interesting. It'd be more elegant indeed. These work for now but could definitely be improved...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment