2012-08-10

Git for Windows Apps

It is funny how a source code management (SCM) system written by Linux Torvalds for the Linux kernel is now a great SCM solution in Windows. I started using Mercurial as my preferred distributed version control system (DVCS) when Google Project Code Hosting added support for it in April of 2009. After Git became more web friendly, they added support for it in June of 2011. Atlassian Bitbucket was originally just for Mercurial repositories, but they added support for Git in October of 2011. Microsoft CodePlex followed suit and announced support for Git in March of 2012. Open source projects like ASP.NET MVC immediately switched to Git. You will also find the Windows Azure SDK using Git. Even better, you can publish a website on Azure with Git. You can also publish a web application to AppHarbor using Git. I tried that today and it worked great. Git is now my preferred SCM. If only I could use it at work instead of TFS’s SCM support. I may have to install and try out git-tfs.

Tools

My development environment is Visual Studio 2010 and 2012 RC on Windows 7 64-bit. I like using TortoiseGit for Windows Explorer integration and the Git Source Control Provider for Visual Studio integration. Both tools require that you install Git for Windows first. Grab the latest one, which is still labeled “beta”, kind of like Gmail was beta for years. When installing it, I deselected all optional components like Windows Explorer integration and selected no Start Menu folder. I do want to be able to run “git” from the Windows Command Prompt, so I selected that option. I also recommend “checkout as-is, commit as-is”. I don’t like when version control systems try to change the line endings.