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
1 Comment »
Leave a comment
-
Recent
-
Links
-
Archives
- May 2008 (1)
- April 2008 (2)
- March 2008 (6)
- February 2008 (9)
-
Categories
-
RSS
Entries RSS
Comments RSS
Haj says : I absolutely agree with this !