Skip to content

Instantly share code, notes, and snippets.

@ioggstream
Created July 4, 2019 13:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ioggstream/680af421ac047e411cde3245dc73a77b to your computer and use it in GitHub Desktop.
Save ioggstream/680af421ac047e411cde3245dc73a77b to your computer and use it in GitHub Desktop.
Some git settings.
# git
. /usr/share/git-core/contrib/completion/git-prompt.sh
# 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 alias.st 'status '
git config --global alias.uno '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