Skip to content

Instantly share code, notes, and snippets.

@capotej
Created November 5, 2012 23:31
Show Gist options
  • Select an option

  • Save capotej/4021111 to your computer and use it in GitHub Desktop.

Select an option

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