Skip to content

Instantly share code, notes, and snippets.

@jrmontag
Last active August 29, 2015 13:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jrmontag/9201367 to your computer and use it in GitHub Desktop.
Save jrmontag/9201367 to your computer and use it in GitHub Desktop.
git branch in prompt (minimal working example)
# (ubuntu)
# add to end of .bashrc :
export PS1="\$(__git_ps1) "$PS1
# gives e.g. (when in a repo):
(master) user@host:~$
# more info: http://stackoverflow.com/questions/15883416/adding-git-branch-on-the-bash-command-prompt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment