Created
November 30, 2017 23:59
-
-
Save mdlinville/5c295136e67c2d91cdf7cb777d537f2c to your computer and use it in GitHub Desktop.
Make your Git setup better
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
# Add this stuff at the end of your .bash_profile file | |
# Git auto-completion support | |
source /Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-completion.bash | |
# Put git branch into prompt | |
source /Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-prompt.sh | |
export GIT_PS1_SHOWDIRTYSTATE=1 | |
# This will make the prompt look like [user@host](BRANCHNAME)$ | |
# and have a * if there are dirty changes, + if there are clean changes, | |
# and also let you know if you are in a cherry-pick or merge or rebase or whatever | |
export PS1='[\u@\h \W]$(__git_ps1 "\[\e[33m\](%s)\[\e[0m\]")\$ ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment