Given Visual Studio 2013 has improved Git support, using Git on Windows is better than ever. Crucial ingredients are:
Also, if you somehow still think Mercurial is “better for Windows”, it’s time to look again, Git has excellent support now.
Yes. Bitbucket allows free private repositories; Github is Github.
I almost recommend Github for Windows more for all the things it does for you during installation than anything after. Notably, Github for Windows:
posh-git, the PowerShell git shell, is installed by Github for Windows. You can obtain it separately through chocolatey or by following the instructions at the posh-git project site.
Sure, you can still use git.exe on a cmd shell, but then you don’t get the fancy colors in your prompt or tab completion. You can also wear a blindfold while programming and program entirely by scent to present yourself with a challenge, I don’t want to tell you how to live your life. But, if you use the cmd shell when posh-git is installed, you’re doing it wrong. Not judging though.
Visual Studio 2013, which now has a working git source control provider. This means:
Note the lock icons and the checkmarks next to each filename.
While this may not sound like a big thing to you, maybe you enjoy typing in hashes at the command line, maybe that’s your thing. For the rest of us:I need to point out that the git diff command I posted above is nowhere near correct. The real command would have been way longer. For fun I tried to run the same diff from the command line…I gave up after 10 minutes.
I also need to point out that reading my commit log is so toxic that it may give you a rare bone disease. My commits were ugly, and I feel it’s important that you know that I am ashamed of them. For example, “Not 100% working” on a commit message is not a recipe for success.
There are a bunch of VS git integration features I didn’t use, like committing, undoing (checkout-ing?) changes, that may prove useful to others. Here’s some screenshots I collected (note this is the Preview build):
The Visual Studio team blog has a detailed, professionally-screenshot-adorned post explaining VS’s git support. Just stop reading once you get to the “team build” section, before you are exposed to an unfiltered view of a XAML-based build system. It’s not pretty. Like Gandalf tells Bilbo in the Hobbit 1 trailer, “…and if you do, you will never be the same.” Some things cannot be unseen.
And with that last parting shot at the build system, I’d like to wrap up. Git on Windows is better than ever. Most of the rough edges have been smoothed out, and the weird stuff you don’t understand probably wasn’t possible in TFS or SVN anyway.
I’ve put together a sample ASP.NET MVC 5 project implementing a portion of Monopoly, You may find browsing the source illuminating. I wrote the project to to explore ASP.NET MVC 5, automated web testing, singleton abuse, basic EF 6, and a few other things.
Get the source (or browse the source online): https://github.com/pseale/monopoly-dotnet
b, blockquote@cite, strong
© Copyright 2014, Peter Seale