Skip to content

Instantly share code, notes, and snippets.

@jamztang
Created November 12, 2011 06:35
Show Gist options
  • Save jamztang/1360140 to your computer and use it in GitHub Desktop.
Save jamztang/1360140 to your computer and use it in GitHub Desktop.
.profile show git branch
export PS1="[\u@\h \W\$(git branch 2> /dev/null | grep -e '\* ' | sed 's/^..\(.*\)/(\1)/')]\$ "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment