• Home
  • About
  • Contact
  • Speaking

Using poshgit @VisualStudio

by Piotr Stapp — on git powershell visual studio 09 Oct 2014

Git in Visual Studio

As You probably know Visual Studio has integrated git client. It is really cool thing. Unfortunately there is a big BUT: it does not support git over ssh.

So in 99% cases I use separate console window to push my stuff to remote repository. But not anymore :)

Package manager console to the rescue

The easiest way (in my opinion of course) is to use Package Manager Console is a PowerShell console :)
The only difference is that it has separate profile file form standard PowerShell.

PoshGit - git extension for PowerShell

If didn't try this before, you should now. It was described before at:
- Better Git with PowerShell @haacked blog - Prompts and Directories - Even Better Git (and Mercurial) with PowerShell @shanselman blog

The effect in PowerShell:
poshgit in powershellhich gives you all needed information with colors and numbers about your local git repository: how many new files, how many changes, is you repository behind/after origin, etc.

Poshgit inside VisualStudio

If you already install posh-git in "normal" PowerShell the easiest step is add "include" in package manager console profile file. Just run inside package manager console

notepad $PROFILE  

and add line like below. Iit depends on how you installed poshgit - you can find it in normal powershell profile with typing in in notepad $PROFILE

. 'C:\Users\XXXXXX\Documents\WindowsPowerShell\Modules\posh-git\profile.example.ps1'

or

. 'C:\[somewhere]\posh-git\profile.example.ps1'

Reload profile with . $PROFILE or just restar Visual Studio. Now I am ready to work:

posh-git in VS


Follow @ptrstpp950

0%
Using poshgit @VisualStudio
words - read.
Recent Posts:

Comments

comments powered by Disqus
Piotr Stapp Author

Piotr Stapp

Developer, engineer, craftsmen, speaker & biker. User of all useful technologies. Believe in people not papers. DevOps & automation adept. In love with web technologies. I speak here for myself only.

Previous post HSTS error in Google Chrome Sometimes, specially after using Fiddler, my Google Chrome shows me HSTS error like below: localhost normally uses encryption to…
Next post Run sudo in Windows It is really frustrating when you need UAC to run one command. You are doing you stuff and you…
All content copyright Reset your code © 2014 • All rights reserved.
Proudly published with Ghost