Last active
December 19, 2015 04:39
-
-
Save hiroy/5898933 to your computer and use it in GitHub Desktop.
Xcodeのgitを使っているときのpromptにブランチ名を表示するように
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
source /Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-completion.bash | |
alias __git_ps1="git branch 2>/dev/null | grep '*' | sed 's/* \(.*\)/(\1)/'" | |
GIT_PS1_SHOWDIRTYSTATE=true | |
GIT_PS1_SHOWSTASHSTATE=true | |
GIT_PS1_SHOWUNTRACKEDFILES=true | |
GIT_PS1_SHOWUPSTREAM=auto | |
export PS1='\[\033[36m\]\u@\h\[\033[00m\]:\[\033[00m\]\w\[\033[34m\]$(__git_ps1)\[\033[00m\] \$ ' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment