Henri Cook
Henri Cook's Blog


Henri Cook's Blog


My favourite git aliases

Henri Cook's photo
Henri Cook
·Feb 26, 2016·

1 min read

I take these git aliases from project to project with me, here they are in case they’re good for you too!

They’re purposefully short, as anyone who works with git regularly on the command line and likes shortcuts may have noticed, it’s a lot of keystrokes day-to-day.

alias st=’git status’
alias cim=’git commit -m $@’
alias cia=’git commit — amend’
alias baseo=’git fetch origin && git rebase origin/masteralias co=’git checkout $@’
alias lg=’git log — color — graph’
alias gd=’git diff’
alias gds=’git diff — staged’
alias bl=”git branch -l”
alias deletemerged=”for i in `git branch — merged`; do git branch -d $i; done”
Share this