当我使用Powerlevel10k(这是ZSH的主题)时,我有问题吗?
答案 0 :(得分:0)
问:Git状态中的不同符号是什么意思?
使用精益,经典或彩虹样式时,Git状态可能如下所示:
feature:master ⇣42⇡42 *42 merge ~42 +42 !42 ?42
传奇:
| Symbol | Meaning | Source | | --------| ------------------------------------------------------------------| ---------------------------------------------------- | | feature | current branch; replaced with #tag or @commit if not on a branch | git status | | master | remote tracking branch; only shown if different from local branch | git rev-parse --abbrev-ref --symbolic-full-name @{u} | | ⇣42 | this many commits behind the remote | git status | | ⇡42 | this many commits ahead of the remote | git status | | *42 | this many stashes | git stash list | | merge | repository state | git status | | ~42 | this many merge conflicts | git status | | +42 | this many staged changes | git status | | !42 | this many unstaged changes | git status | | ?42 | this many untracked files | git status |
如果您已在主目录的根目录下创建了一个Git存储库来存储点文件,则可能要忽略其中的未跟踪文件。您可以通过执行以下命令来实现:
git -C ~ config status.showuntrackedfiles no
这将产生多种效果:
git status
将更快。git status
不会列出171个未跟踪的文件。?171
将从您的提示中消失。您可以使用以下命令撤消上述命令:
git -C ~ config --unset status.showuntrackedfiles
如果您不想在主目录中的提示符下看到Git状态,请将此参数添加到~/.p10k.zsh
:
# Don't display Git status in prompt for Git repositories whose workdir matches
# this pattern.
typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~'