Skip to content

Instantly share code, notes, and snippets.

@bssstudio
Created July 12, 2013 07:08
Show Gist options
  • Select an option

  • Save bssstudio/5982500 to your computer and use it in GitHub Desktop.

Select an option

Save bssstudio/5982500 to your computer and use it in GitHub Desktop.
GIT branch in bash on mint
__git_ps1 ()
{
local b="$(git symbolic-ref HEAD 2>/dev/null)";
if [ -n "$b" ]; then
printf " (%s)" "${b##refs/heads/}";
fi
}
#PS1="${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\]"
PS1="${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[01;34m\] \w\[\033[01;31m\]\$( __git_ps1 ) \[\033[01;34m\]\$\[\033[00m\] "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment