Skip to content

Instantly share code, notes, and snippets.

@chrisyour
Created December 2, 2010 22:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrisyour/726230 to your computer and use it in GitHub Desktop.
Save chrisyour/726230 to your computer and use it in GitHub Desktop.
Git Branch Status in the Command Prompt (OSX)
# A minimally beautiful command prompt:
# user: directory (branch):
# Place this in ~/.bashrc
export PS1="\u: \W"'$(__git_ps1 " (%s)")'": "
# Place this is /etc/profile to ensure Terminal sources ~/.bashrc when it launches
[ -r $HOME/.bashrc ] && source $HOME/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment