Terminal: iTerm2
Shell: zsh (oh my zsh)
Issue: I am seeing a star * on git prompt even though the branch has been updated and no changes have been made. Any idea what it means and how to get it cleared from the git prompt.
The * indicates that you have x number of stashes saved on this repository. So in your case *1
means that you have 1 stash stored on this repository. Run below command and you will see that this number matches the number of stashes:
git stash list
If *1
bothers you then you can remove† your stashes with:
git stash clear
†: this will permanently delete your stashes and you will not be able to recover them through the normal safety mechanisms‡.
‡: Reference - https://git-scm.com/docs/git-stash#Documentation/git-stash.txt-Recoveringstashentriesthatwerecleareddroppederroneously
The official git-prompt.sh script includes:
# In addition, if you set GIT_PS1_SHOWDIRTYSTATE to a nonempty value,
# unstaged (*) and staged (+) changes will be shown next to the branch
# name. You can configure this per-repository with the
# bash.showDirtyState variable, which defaults to true once
# GIT_PS1_SHOWDIRTYSTATE is enabled.
Check first in your ~/.zshrc
if you are using vcs_info
instead.
It could come with its own set of customization, as in this gist.
For instance, check with git stash list
if you have any files stashed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With