See your current Git branch and dirty-file count at a glance in every terminal prompt without running extra commands
Configure the prompt to only activate inside Git repositories so non-repo directories stay uncluttered
Set up a color-themed Git prompt in Fish shell by copying the prompt file to the Fish functions directory
Bash-git-prompt is a shell script add-on that modifies your terminal prompt to display live information about whichever Git repository you are currently working inside. Instead of a plain directory path, your prompt shows the branch name, how many files have been changed or staged, whether you are ahead of or behind the remote server, and other status details, all at a glance without running any separate commands. The project is a port of a similar prompt originally written for the Zsh shell, adapted here for Bash and also compatible with Fish. The prompt uses small symbols to represent different states: a checkmark when the repository is clean, a dot with a number for staged files, an X for merge conflicts, an upward arrow when you are ahead of the remote branch, a downward arrow when behind, and so on. The README shows several example prompts so you can see what these look like in practice. Installation can be done in a few ways. On Mac, Homebrew handles it with a single command. You can also clone the repository directly and add a short block of code to your shell configuration file pointing at the cloned script. Fish shell users have their own path through the fish config GUI or by copying the prompt file to the Fish functions directory. Once installed, behavior is controlled through environment variables set before sourcing the script. You can limit the prompt to only appear when inside a Git repository, control whether it automatically checks the remote for changes, show or hide untracked file counts, and switch between preset color themes. Several bundled themes are available, including one optimized for Solarized color schemes. A custom theme can be defined by overriding a single function in a separate file in your home directory.
← magicmonty on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.