Skip to content

Instantly share code, notes, and snippets.

@pdt256
Last active April 25, 2018 22:48
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 pdt256/3540174 to your computer and use it in GitHub Desktop.
Save pdt256/3540174 to your computer and use it in GitHub Desktop.
Git PS1
# brew install bash-git-prompt
# get full path: $(brew --prefix bash-git-prompt)/share/gitprompt.sh
if [ -f /usr/local/opt/bash-git-prompt/share/gitprompt.sh ]; then
GIT_PROMPT_THEME=Default
source /usr/local/opt/bash-git-prompt/share/gitprompt.sh
fi
# brew install bash-completion
# get full path: $(brew --prefix)/etc/bash_completion
if [ -f /usr/local/etc/bash_completion ]; then
. /usr/local/etc/bash_completion
fi
export GIT_PROMPT_ONLY_IN_REPO=1
export GIT_PROMPT_FETCH_REMOTE_STATUS=0
export HISTCONTROL=ignoreboth:erasedups
export HISTFILESIZE=10000
export PATH="$HOME/bin:$PATH"
export GOPATH=~/go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment