Skip to content

Instantly share code, notes, and snippets.

@oleggreen
Last active August 29, 2015 14:00
Show Gist options
  • Select an option

  • Save oleggreen/d08194fcdbfd58531d37 to your computer and use it in GitHub Desktop.

Select an option

Save oleggreen/d08194fcdbfd58531d37 to your computer and use it in GitHub Desktop.
configuring git branch appearance in prompt
# add lines below to a "~/.bashrc" file
# or save this file for example in "~/" folder
# and include file in "~/.bashrc":
# if [ -f ~/.git_branch_in_prompt.sh ]; then
# . ~/.git_branch_in_prompt.sh
# fi
RED='\[\033[1;31m\]'
YELLOW='\[\033[1;33m\]'
GREEN='\[\033[1;32m\]'
BLUE='\[\033[1;34m\]'
NO_COLOR='\[\033[0m\]'
export PS1=$BLUE'\u:'$BLUE'\w'$RED'$(__git_ps1)'$BLUE' \$'$NO_COLOR' '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment