Skip to content

Instantly share code, notes, and snippets.

@ravicious
Created September 2, 2010 17:06
Show Gist options
  • Select an option

  • Save ravicious/562561 to your computer and use it in GitHub Desktop.

Select an option

Save ravicious/562561 to your computer and use it in GitHub Desktop.
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\[\1\]/'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment