Skip to content

zouzonghua/git-prompt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

git-prompt

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)

Install

bash -c "$(curl -fsSL https://raw.githubusercontent.com/zouzonghua/git-prompt/main/install.sh)"

Then reload your shell:

source ~/.zshrc   # zsh
source ~/.bashrc  # bash

Uninstall

rm ~/scripts/git_prompt.sh

Remove the source line from ~/.zshrc or ~/.bashrc, then open a new shell.

How it works

State Color
Clean Green
Dirty Red
Not a git repo (nothing)

License

MIT

About

A minimal git branch indicator for bash and zsh.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages