您需要安装posh-git:https://github.com/dahlbyk/posh-git 您还可以查看这个教程:https://www.hanselman.com/blog/how-to-make-a-pretty-prompt-in-windows-terminal-with-powerline-nerd-fonts-cascadia-code-wsl-and-ohmyposh。