Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Git with Visual Studio [closed]

As a long-time Visual SourceSafe user (and hater) I was discussing switching to SVN with a colleague; he suggested using Git instead. Since, apparently, it can be used as peer-to-peer without a central server (we are a 3-developer team).

I have not been able to find anything about tools that integrate Git with Visual Studio, though - does such a thing exist?

What are the technologies available for using Git with Visual Studio? And what do I need to know about how they differ before I begin?

like image 783
Herb Caudill Avatar asked Feb 03 '09 14:02

Herb Caudill


People also ask

Can you use Git with Visual Studio?

Start with Git & GitHub in Visual Studio Or, you can work locally with no provider at all. To get started using Git with Visual Studio: If you have a Git repo hosted on a Git provider like GitHub, clone the repository to your local machine. Otherwise, easily create a new Git repository and add your code.

How do I open Git in Visual Studio?

In the Visual Studio IDE, select the Git menu, select Local Repositories, and then select Open Local Repository. Alternatively, you can perform the same task from Solution Explorer.

Is Git necessary for Visual Studio Code?

Like VS Code, GitHub is also imperative for the developer community. Hence it is very important to know how to install GitHub in the Visual Studio Code. For the uninitiated, GitHub is a web-based hosting service based on the Git Version Control System.

Can Visual Studio interact directly with GitHub?

Seamless integration with GitHubAuthenticate your GitHub.com or GitHub enterprise account to create a repository, and push your first commits to GitHub, all through Visual Studio.


2 Answers

In Jan 2013, Microsoft announced that they are adding full Git support into all their ALM products. They have published a plugin for Visual Studio 2012 that adds Git source control integration.

Alternatively, there is a project called Git Extensions that includes add-ins for Visual Studio 2005, 2008, 2010 and 2012, as well as Windows Explorer integration. It's regularly updated and having used it on a couple of projects, I've found it very useful.

Another option is Git Source Control Provider.

like image 184
Jon Rimmer Avatar answered Oct 10 '22 11:10

Jon Rimmer


I use Git with Visual Studio for my port of Protocol Buffers to C#. I don't use the GUI - I just keep a command line open as well as Visual Studio.

For the most part it's fine - the only problem is when you want to rename a file. Both Git and Visual Studio would rather that they were the one to rename it. I think that renaming it in Visual Studio is the way to go though - just be careful what you do at the Git side afterwards. Although this has been a bit of a pain in the past, I've heard that it actually should be pretty seamless on the Git side, because it can notice that the contents will be mostly the same. (Not entirely the same, usually - you tend to rename a file when you're renaming the class, IME.)

But basically - yes, it works fine. I'm a Git newbie, but I can get it to do everything I need it to. Make sure you have a git ignore file for bin and obj, and *.user.

like image 27
Jon Skeet Avatar answered Oct 10 '22 09:10

Jon Skeet