How to show current git branch in Visual Studio Code (VS Code)’s Terminal from Microsoft Windows

Bryant Jimin Son
2 min readJul 20, 2023

If you are using Microsoft Windows and interact with git, it might be convenient for you to use Visual Studio Code’s built-in Terminal window to interact with git instead of switch back and forth between Git CLI and VS Code. Unfortunately, your default Terminal might look like this in your VS Code’s Terminal when you go to a git initialized or cloned directory.

Does not show current branch

What can you do to show the current branch? First, click File option in top tool bar then go to Preferences then Settings.

Go to File > Preferences > Settings

And open a File Explorer window. Try to locate Git Bash’s installation path. For me, it is under C:\Program Files\Git. You will need to copy the path and the file name git-bash.exe

Copy the path to the file

Now, let’s go back to your VS Code’s Settings again. From there, we need to make two changes. First, let’s search for terminal. Then, under Terminal: External Window Exec, replace the path value with the path to git-bash.exe.

--

--

Bryant Jimin Son

A cloud practitioner talking about technology, travels & career tips. But I will sometimes cover financial advises and some random stuffs.