Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

You could also show outstanding commits #57

Open
ferretwithaberet opened this issue May 6, 2020 · 0 comments
Open

You could also show outstanding commits #57

ferretwithaberet opened this issue May 6, 2020 · 0 comments

Comments

@ferretwithaberet
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant