社区所有版块导航
Python
python开源   Django   Python   DjangoApp   pycharm  
DATA
docker   Elasticsearch  
aigc
aigc   chatgpt  
WEB开发
linux   MongoDB   Redis   DATABASE   NGINX   其他Web框架   web工具   zookeeper   tornado   NoSql   Bootstrap   js   peewee   Git   bottle   IE   MQ   Jquery  
机器学习
机器学习算法  
Python88.com
反馈   公告   社区推广  
产品
短视频  
印度
印度  
Py学习  »  Git

zsh上git提示符中的星号*symbol

Krush • 3 年前 • 1677 次点击  

iTerm2

壳牌: zsh(哦,我的zsh)

问题: 我在git提示符上看到一个星号*,尽管分支已经更新,并且没有做任何更改。你知道这意味着什么,以及如何从git提示符中清除它吗。

See Image

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/128054
 
1677 次点击  
文章 [ 2 ]  |  最新文章 3 年前
Anthony Avila
Reply   •   1 楼
Anthony Avila    3 年前

*表示此存储库中保存了x个存储库。所以在你的情况下 *1 这意味着您在此存储库中存储了1个存储库。运行下面的命令,您将看到这个数字与存储的数量匹配:

git stash list

如果 *1 让你烦恼的是,你可以用以下方法移除你的藏品:

git stash clear

:这将永久删除您的存储,您将无法通过正常的安全机制恢复它们。

——参考文献- https://git-scm.com/docs/git-stash#Documentation/git-stash.txt-Recoveringstashentriesthatwerecleareddroppederroneously

VonC
Reply   •   2 楼
VonC    4 年前

官员 git-prompt.sh script 包括:

# 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.

先检查一下你的电脑 ~/.zshrc 如果你正在使用 vcs_info instead .
它可以有自己的一套定制,比如 this gist .

例如,与 git stash list 如果你有任何文件。