Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Some git settings.
# git
. /usr/share/git-core/contrib/completion/
# git prompt.
# NB: You must wrap all escape sequences between \[ and \]
# in order for 'readline' to correctly calculate the prompt's visible length.
# Without them, 'readline' thinks the prompt is longer than it is,
# and doesn't know when the text reaches the margin
# PS1='$(foo="\e[90m$(__git_ps1)\e[0m"; echo -e "[$foo \u@\h \e[32m\W\e[0m]\$" ) '
PS1='$(foo="\[\e[90m\]$(__git_ps1)\[\e[0m\]"; echo -e "[$foo \u@\h \e[32m\W\e[0m]\$" ) '
# git aliases
git config --global 'status '
git config --global 'status -uno '
git config --global alias.unstage 'reset HEAD '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.