Skip to content

Instantly share code, notes, and snippets.

@robertsosinski
Created June 9, 2011 15:52
Show Gist options
  • Select an option

  • Save robertsosinski/1017034 to your computer and use it in GitHub Desktop.

Select an option

Save robertsosinski/1017034 to your computer and use it in GitHub Desktop.
My Git Prompt
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
PS1="\u@\h:\W\$(parse_git_branch)$ "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment