Using Git with Visual Studio [closed]

2018-12-31 09:21发布

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?

16条回答
宁负流年不负卿
2楼-- · 2018-12-31 09:33

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.

查看更多
路过你的时光
3楼-- · 2018-12-31 09:37

Git Source Control Provider is new plug-in that integrates Git with Visual Studio.

查看更多
残风、尘缘若梦
4楼-- · 2018-12-31 09:37

Microsoft announced Git for Visual studio 2012 (update 2) recently. I have not played around with it yet, but this video looks promising.

Here is a quick tutorial on how to use Git from Visual Studio 2012.

查看更多
浮光初槿花落
5楼-- · 2018-12-31 09:38

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.

查看更多
孤独总比滥情好
6楼-- · 2018-12-31 09:38

As mantioned by Jon Rimmer, you can use GitExtensions. GitExtensions does work in Visual Studio 2005 and Visual Studio 2008, it also does work in Visual Studio 2010 if you manually copy and config the .Addin file.

查看更多
琉璃瓶的回忆
7楼-- · 2018-12-31 09:42

There's a Visual Studio Tools for Git by Microsoft. It only supports Visual Studio 2012 (update 2) though.

查看更多
登录 后发表回答