Re:Display your current git branch as part of your bash prompt
by joshwa on Sunday August 16, 2009 @11:07PM
(#767254)
git-completion.bash has the added benefit of giving you tab-completion on git commands, and arguments to git commands.
[ Parent
| on HN ]
Re:Display your current git branch as part of your bash prompt
by vicaya on Monday August 17, 2009 @05:11PM
(#769117)
It also shows the correct state of merge/rebase in the prompt as well. In many distributions, it's installed as /etc/bash_completion.d/git when you install git from a package management system, you just need to source /etc/bash_completion to get all the benefits.
The OP is an example of wheel reinvented, poorly.