Monday, November 17, 2008

Small surprise from Git 1.6

After installing Git 1.6.0.4 on my Leopard box I noticed that lots of git-* executables are finally gone in a favor of the single git binary. I like it, as I never liked qmail style of having a separate executable for every operation. By the way, if you're on Mac don't forget turning on bash_completion variant for git-core:

sudo port install git-core +doc +bash_completion

Also set up aliases (git st really saves your fingers), colors and personal data:

git config --global alias.st status
git config --global alias.ci commit
git config --global alias.co checkout
git config --global alias.br branch
git config --global color.ui auto

git config --global user.name "Your name"
git config --global user.email your-email@your-domain.com

Finally, some .bash_profile goodness to track branch in bash prompt (and add colors):

PS1='\[\033[01;32m\]\h\[\033[01;34m\] \w\[\033[31m\]$(__git_ps1 "(%s)") \[\033[01;34m\]$\[\033[00m\] '

1 comment:

Anonymous said...

A fancier one:

PS1='\[\e[0;36m\]\u@\h\[\e[00m\]:\[\e[1;33m\]\W$ \[\e[0m\]'