终端: iTerm2
外壳: zsh(哦我的zsh)
问题:即使分支已更新且未进行任何更改,我仍然在 git 提示符上看到一个星号 *。知道这意味着什么以及如何从 git 提示符中清除它。
Ant*_*ila 23
* 表示您在此存储库中保存了 x 个存储库。因此,就您而言*1
,这意味着您在此存储库中存储了 1 个存储。运行以下命令,您将看到该数字与存储的数量匹配:
git stash list
如果*1
打扰你,那么你可以使用以下命令删除\xe2\x80\xa0 你的存储:
git stash clear
\xe2\x80\xa0:这将永久删除您的存储,并且您将无法通过正常的安全机制恢复它们\xe2\x80\xa1。
\n\xe2\x80\xa1:参考 - https://git-scm.com/docs/git-stash#Documentation/git-stash.txt-Recoveringstasentriesthatwerecleareddroppederroneously
\n官方的git-prompt.sh 脚本包括:
# 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.
Run Code Online (Sandbox Code Playgroud)
首先检查您是否~/.zshrc
正在使用.
它可以有自己的一套定制,就像这个要点一样。vcs_info
例如,检查git stash list
您是否隐藏了任何文件。
归档时间: |
|
查看次数: |
5045 次 |
最近记录: |