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 !
Written by Emmanuel Bourgerie
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#