Last Updated: February 25, 2016
·
396
· manudwarf

git branch in bash

Just wanted to share my bash configuration, that I find pretty handy :

[user@host]:~/folder/project (master)
$

Get this file and save it as ~/.git-prompt.sh : https://github.com/git/git/blob/master/contrib/completion/git-prompt.sh

And modify bash_profile :

source ~/.git-prompt.sh
PS1='[\u@\h]:\w$(__git_ps1)\n$ '

And voila !