Tuesday, August 18, 2009

GIT shortcuts

Time to revise the GIT short cuts. I've added these in ~/.bashrc:

alias ls='ls -lAXh --color'
alias gup='git push'
alias gdl='git pull'
alias gc='git commit'
alias gl='git log'
alias gd='git diff'
alias gdc='git diff --cached'
alias gdh='git diff HEAD'
alias gb='git branch'
alias gt='git tag'
alias gm='git merge'
alias gs='git status'
alias gco='git checkout'
alias gcl='git clean'
alias grs='git reset'
alias grb='git rebase'


Jason Meridth said...

Is the reason these are in your bashrc is so that you wouldn't have to type the 'git' word? I have mine in my ~/.gitconfig (global). like I have 'pom' set as 'pull origin master' = git pom. :)

just curious. I'm tempted to move mine to mu bashrc also. gpom is shorter that 'git pom'

Keep up the blogging. Congrats on the NHibernate contributor status.

Adam said...

yes.. I seem to type 'git' for 80% of my commands. This is a significant efficiency boost if it gets rid of 'it ' having to be typed ;)