Skip to content

Instantly share code, notes, and snippets.

@shameerc
Created September 3, 2012 10:09
Show Gist options
  • Save shameerc/3608297 to your computer and use it in GitHub Desktop.
Save shameerc/3608297 to your computer and use it in GitHub Desktop.
Show Git branch name on shell prompt
# this will show current branch name of repository in shell prompt
# add this in ~/.bashrc
export PS1="\\[\033[1;55m\]\w\$(__git_ps1 ' [%s]') \$ "
@harikt
Copy link

harikt commented Sep 3, 2012

Nice one man!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment