dotfiles
dotfiles copied to clipboard
You could also show outstanding commits
Not a issue, maybe a "feature request", but I modified your .bash_prompt like so:
# Check for unstaged changes.
if ! $(git diff-files --quiet --ignore-submodules --); then
s+="${red}!";
fi;
# Check for untracked files.
if [ -n "$(git ls-files --others --exclude-standard)" ]; then
s+="${orange}?";
fi;
# Check for uncommitted changes in the index.
if ! $(git diff --quiet --ignore-submodules --cached); then
s+="${green}+";
fi;
# Check for outstanding commits
if [ -n "$(git log --quiet --oneline origin/master..HEAD 2>/dev/null)" ]; then
s+="${cyan}^";
fi;
I am a starter in bash scripting, but damn do I love that cyan ^
when I got unpushed commits.