/ Visual Studio Team Services

Use Git commandline directly from Visual Studio

Not many people seem to know this, but the Visual Studio Package manager is nothing more than a Powershell window inside Visual Studio with a bunch of modules loaded. Which means that you can use it to execute just about any command you'd like.

So if you need to run git commands to stash or squash something, all you need to do is type the command right into that window.

To make your life easier you can even add PoshGit to the Package Manager Console, this will give you command auto-completion. yay!

Install the Git Command Line tools.

Execute the following commands from the package manager console:

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Confirm
(new-object Net.WebClient).DownloadString("http://psget.net/GetPsGet.ps1") | iex
Import-Module PsGet
Install-Module Posh-Git –force

Now you have command completion inside Visual Studio. Nice!

Jesse Houwing

Jesse Houwing

I love good coffee, meaning strong, dark espresso! Regular Expressions and LINQ are like word-puzzles! I am a trainer for Scrum.org, a member of the Microsoft ALM Rangers and awarded Microsoft MVP.

Read More
Use Git commandline directly from Visual Studio
Share this