How to display your git branch name on the shell prompt?

This one is rather simple! Add the following to your .bash_profile on your linux machine.

parse_git_branch() {
     git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\u@\h \[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ "
Previous
Previous

How to cURL?

Next
Next

What is Roaming?