Git Branch in bash prompt
27. Mar 2012
1 minute read

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\$ '