Last active
August 27, 2015 20:00
-
-
Save wwalker/f1433fe4a245cd95af65 to your computer and use it in GitHub Desktop.
my git bash setup
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
optionally_source () { | |
if [[ -f $1 ]] | |
then | |
. $1 | |
fi | |
} | |
optionally_source /usr/share/doc/git/contrib/completion/git-prompt.sh | |
optionally_source /usr/share/doc/git/contrib/completion/git-completion.bash | |
GIT_PS1_SHOWCOLORHINTS=1 | |
GIT_PS1_SHOWDIRTYSTATE=1 | |
GIT_PS1_SHOWSTASHSTATE=1 | |
GIT_PS1_SHOWUNTRACKEDFILES=1 | |
GIT_PS1_SHOWUPSTREAM="verbose name git" | |
GIT_PS1_DESCRIBE_STYLE=describe | |
if type -t __git_ps1 | grep -q function | |
then | |
PROMPT_COMMAND='__git_ps1 "\u@\h:\w" "\\\$ "' | |
fi |
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
diff --git contrib/completion/git-prompt.sh contrib/completion/git-prompt.sh | |
index 07b52be..ac8fecc 100644 | |
--- contrib/completion/git-prompt.sh | |
+++ contrib/completion/git-prompt.sh | |
@@ -192,7 +192,7 @@ __git_ps1_show_upstream () | |
if [[ -z "$verbose" ]]; then | |
case "$count" in | |
"") # no upstream | |
- p="" ;; | |
+ p="&" ;; | |
"0 0") # equal to upstream | |
p="=" ;; | |
"0 "*) # ahead of upstream | |
@@ -205,7 +205,7 @@ __git_ps1_show_upstream () | |
else | |
case "$count" in | |
"") # no upstream | |
- p="" ;; | |
+ p=" &" ;; | |
"0 0") # equal to upstream | |
p=" u=" ;; | |
"0 "*) # ahead of upstream |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
the patch is just because I do this: