Setup terminal prompt to show the current git branch
Go to your Mac home directory (on my computers, that's usually briancasel
Show hidden files
Edit the file .bash_profile
This was the contents of that file on my iMac:
export PATH=~/.composer/vendor/bin:$PATH
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
export PATH="/usr/local/sbin:$PATH"
parse_git_branch( ) {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
PS1=':\W $(parse_git_branch) $ '
Last updated