Skip to content

Instantly share code, notes, and snippets.

@muspelheim
Last active August 29, 2015 14:18
Show Gist options
  • Save muspelheim/749ddb9afb13d474b587 to your computer and use it in GitHub Desktop.
Save muspelheim/749ddb9afb13d474b587 to your computer and use it in GitHub Desktop.
Show current branch on bash
cat ~/.bashrc
source /etc/bash_completion.d/git-prompt
#PS1=$PS1'$(__git_ps1 "(%s) ")'
PS1=$PS1'$(__git_ps1 "\[\e[0;32m\](%s) \[\e[0m\]")'
OR
nano ~/.bashrc
and add to end file
source /etc/bash_completion.d/git-prompt
#PS1=$PS1'$(__git_ps1 "(%s) ")'
PS1=$PS1'$(__git_ps1 "\[\e[0;32m\](%s) \[\e[0m\]")'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment