Skip to content

Instantly share code, notes, and snippets.

@woodie
Created May 16, 2021 20:49
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 woodie/b79cd7ace4fb016f2b5dcbdde09ee212 to your computer and use it in GitHub Desktop.
Save woodie/b79cd7ace4fb016f2b5dcbdde09ee212 to your computer and use it in GitHub Desktop.
The git status prompt I've been using for years
# username@ ~/workspace/repo (branch)
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\] \[\033[33;1m\]\w\[\033[m\] (\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)) \$ "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment