Last active
August 29, 2015 14:10
-
-
Save swalberg/c0c075e90aa4eb63543f to your computer and use it in GitHub Desktop.
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
# This gets you the __git_ps1 function | |
if [ -f `brew --prefix`/etc/bash_completion.d/git-completion.bash ]; then | |
. `brew --prefix`/etc/bash_completion.d/git-completion.bash | |
fi | |
# show some extra metadata in the prompt such as if you have unchecked/tracked files | |
export GIT_PS1_SHOWDIRTYSTATE=1 | |
export GIT_PS1_SHOWSTASHSTATE=1 | |
export GIT_PS1_SHOWUNTRACKEDFILES=1 | |
# Set the prompt | |
PS1='\h:\W$(__git_ps1 "(%s)") \$ ' | |
# tab completion of branches and other refs | |
if [ -f `brew --prefix`/etc/bash_completion.d/git-prompt.sh ]; then | |
. `brew --prefix`/etc/bash_completion.d/git-prompt.sh | |
fi | |
# Try and fix bad behaviours | |
function gut { | |
growlnotify -m "It's git, dumbass" | |
git $* | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment