A bash
script that displays information about the current git location. In particular the branch name, difference with remote branch, number of files staged, changed, etc.
This script is based on the original work of magicmonty (https://github.com/magicmonty/bash-git-prompt). In this fork I dropped a lot of stuff I didn't actually need, and modified the main behaviour: instead of setting your prompt, it outputs a colored string that you can include wherever you need.
The output of the script (included in a prompt) looks like the following:
The symbols are as follows:
↑n
: ahead of remote byn
commits↓n
: behind remote byn
commits↓m↑n
: branches diverged, remote bym
commits, yours byn
commits✚n
: there aren
staged files●n
: there aren
unstaged files…n
: there aren
untracked files✖n
: there aren
unmerged files⚑n
: there aren
stash entries