Skip to content

Instantly share code, notes, and snippets.

@markcam1
Last active November 28, 2018 19:35
Show Gist options
  • Save markcam1/78bb6a4874bc1ca3f327132cc28a8aca to your computer and use it in GitHub Desktop.
Save markcam1/78bb6a4874bc1ca3f327132cc28a8aca to your computer and use it in GitHub Desktop.
Git Bash Terminal configurations to see
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
PS1='${debian_chroot:+($debian_chroot)}\[\033[1;32m\]\h\[\033[1;37m\]:\[\033[1;36m\]\w \[\033[1;35m\]$(parse_git_branch) \[\033[1;33m\]\$ \[\033[0m\]'
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
PS1='${debian_chroot:+($debian_chroot)}\[\033[1;31m\]\u\[\033[1;37m\]@\[\033[1;32m\]\h\[\033[1;37m\]:\[\033[1;36m\]\w \[\033[1;35m\]$(parse_git_branch) \[\033[1;33m\]\$ \[\033[0m\]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment