Skip to content

Instantly share code, notes, and snippets.

@mybuddymichael
Created October 5, 2012 17:24
Show Gist options
  • Save mybuddymichael/3841153 to your computer and use it in GitHub Desktop.
Save mybuddymichael/3841153 to your computer and use it in GitHub Desktop.
__git_ps1() {
local b="$(git symbolic-ref HEAD 2>/dev/null)";
if [ -n "$b" ]; then
printf " (%s)" "${b##refs/heads/}";
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment