Search code examples
windowsgitpowershellwindows-terminal

How can we show branch name anytime we’re running terminal on git directory in windows?


The branch name is shown in git bash, but in my vs code, the branch name does not show.
I want the branch name to be shown in PowerShell as it is my default terminal in vs code.


Solution

  • You should install posh-git: https://github.com/dahlbyk/posh-git

    You could also have a look at this tutorial: https://www.hanselman.com/blog/how-to-make-a-pretty-prompt-in-windows-terminal-with-powerline-nerd-fonts-cascadia-code-wsl-and-ohmyposh