GIT : display the current branch in prompt

Stop confusing branches.

To display the current Git branch in the Linux prompt when you are visiting a repository, copy this at the end of your bashrc.

Display the Git branch in PS1

function parse_git_branch { git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1]/" } PS1="$PS1\$(parse_git_branch)"