Search code examples
gitvisual-studiovisual-studio-2019

Can I run Git commands in Visual Studio?


I am using Visual Studio Team Explorer with git integration for source control. It works pretty well but sometimes I need to run some more advanced git commands so I am going to file explorer and opening git bash. Can I run git commands inside Visual Studio?

Using Visual Studio 19.


Solution

  • The Git integration in Visual Studio does not offer any terminal or ability to manually run Git commands. Using other means to obtain a terminal (ex: Package Manager Console as mentioned above) is a workaround for some Git commands.

    You will run into some issues, though. For example, commands that present paged output (ex: Press key to continue) often do not work properly in the Package Manager Console. They may scroll all the way to the end of their results rather than breaking on page boundaries since they can't tell the size of the Package Manager Console tool window. There are some other little annoyances that you may encounter as well.