3

我喜欢 git 的posh-git powershell env,但在一些(非常大的)存储库上,它明显减慢了 ps 提示符。

我想知道是否可以在某些特定存储库上禁用它

4

1 回答 1

6

为了性能,他们确实建议了一种禁用每个存储库的文件状态的方法:

https://github.com/dahlbyk/posh-git#customization-variables

性能注意事项:在 git 提示符中显示非常大的 repo 的文件状态可能会非常慢。无需完全关闭文件状态 ($GitPromptSettings.EnableFileStatus = $false),您可以通过将单独的存储库路径添加到 $GitPromptSettings.RepositoriesInWhichToDisableFileStatus 来逐个 repo 禁用它。

于 2019-11-07T04:46:41.960 回答