A minimal git branch indicator for bash and zsh. Appends the current branch to your existing prompt — no theme overrides, no framework required.
zonghua@MacBook-Air ~ % # not a git repo
zonghua@MacBook-Air notes [main] % # clean (green)
zonghua@MacBook-Air notes [main] % # dirty (red)
bash -c "$(curl -fsSL https://raw.githubusercontent.com/zouzonghua/git-prompt/main/install.sh)"Then reload your shell:
source ~/.zshrc # zsh
source ~/.bashrc # bashrm ~/scripts/git_prompt.shRemove the source line from ~/.zshrc or ~/.bashrc, then open a new shell.
| State | Color |
|---|---|
| Clean | Green |
| Dirty | Red |
| Not a git repo | (nothing) |