Created
March 23, 2010 18:35
-
-
Save brodock/341501 to your computer and use it in GitHub Desktop.
Git branch on Shell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# colocar no ~/.profile | |
# Git Branch | |
function parse_git_branch { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1) /' | |
} | |
GREEN="\[\e[0;32m\]" | |
YELLOW="\[\e[0;33m\]" | |
NC="\[\e[0m\]" | |
PS1="\u@\h:\W $YELLOW\$(parse_git_branch)$NC\$ " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment