Skip to content

Instantly share code, notes, and snippets.

@hatched
Created December 6, 2013 15:45
Show Gist options
  • Select an option

  • Save hatched/7826871 to your computer and use it in GitHub Desktop.

Select an option

Save hatched/7826871 to your computer and use it in GitHub Desktop.
Show git branch information in the prompt
export PS1='\u@\h:\w `git branch 2> /dev/null | grep -e ^* | sed -E s/^\\\\\*\ \(.+\)$/\(\\\\\1\)\ /`\[\033[37m\]:'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment