gallois_weblog

inutilidades em geral

git and bash tips

some tips for improving your git ans bash interaction

for completion copy ‘etc/bash_completion.d/git’ to ‘~./bash_completion.d/git’
after that add the following lines to your ‘~/.bashrc’
PS1=’${debian_chroot:+($debian_chroot)}\u@\h:\w$(git branch &>/dev/null; if [ $? -eq 0 ]; then echo ” ($(git branch | grep ‘^*’ |sed s/\*\ //))”; fi)\$ ‘
. .bash_completion.d/git

the first line you make the shell show you the branch you’re in inside parenthesis after the path.
all was done under debian lenny

cheers

April 1, 2008 - Posted by gallois | pc, programacao | , , | 1 Comment

1 Comment »

  1. Haj says : I absolutely agree with this !

    Comment by haj | June 3, 2008


Leave a comment