# Displaying your current working git branch on the prompt

This is just a small (but hopefully useful for some) tip about how to add the current working git branch on your command prompt. Simply add the following to your .bashrc file in your home directory, or /etc/profile to make it global.

source /usr/share/git-core/contrib/completion/git-prompt.sh

PS1='\[\033[0;32m\]\[\033[0m\033[0;32m\]\u@\h\[\033[0;36m\] [\W]\[\033[1;33m\]$(__git_ps1)\[\033[1;33m\]\[\033[0m\033[0;32m\] \$\[\033[0m\033[0;32m\]\[\033[0m\] '

And that's what it should look like.

space, the last frontier

Hope you'll find it useful 😃