Created
December 10, 2013 01:03
-
-
Save guenter/7884094 to your computer and use it in GitHub Desktop.
Show git branch in prompt
This file contains 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
# Git | |
source /usr/local/etc/bash_completion.d/git-prompt.sh | |
if [ "$USER" = "root" ]; then | |
PS1='\e[1;31m[\u@\h \W[\033[34m\]$(__git_ps1 " (%s)")\[\033[00m\]\$\e[0m ' | |
else | |
PS1='\u@\h \w$(__git_ps1 " (%s)")\$ ' | |
fi | |
alias g='git' | |
alias gpr='git pull --rebase' | |
alias gp='git push' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment