Git Branch in bash prompt


My Bash prompt is something like this toke$. Where archimedes is the hostname, the directory within an git checkout, master the actual branch and toke my username. To get this result set this PS1 in your .bashrc:

## Add Git-Branch
PS1='\h:\W$(__git_ps1 "(%s)") \u\$ '
blog comments powered by Disqus
Posted at by toke