Git for .NET Developers
August 24th, 2008
Git is the latest craze in the open source development world. However, Git works well beyond the confines of an open source team; it is excellent source control for personal projects as well! Git was created for branching and merging: in that realm it far exceeds Subversion. However, comparing Git to Subversion is not fair. It’s like comparing .NET to Ruby on Rails. They were created to solve problems in different spaces. If you are considering learning Git, the first step is to completely forget everything you know about modern source control. After that, find a good guide that doesn’t compare it to centralized version control systems like Git from the bottom up by New Artisans.
Git runs native on all *nix (that’s Linux and Unix derivatives such as BSD and Mac OS). It is not very well known that it also runs on Windows. There is an open source project called MSysGit that allows the rest of the non-Unix world to use it. A nice part of Git is the .gitignore file. This file contains a list of patterns telling Git which files should not be under source control. When I first started trying to use Git with my .NET projects, this was my biggest stumbling block. Typically, we want to ignore bin/ and obj/ folders, .csproj.user (and .vbproj.user) files, .suo files, and ReSharper caches; you know, the regular garbage that shouldn’t go into source control. If you want to get started trying Git with your .NET project, and want to keep a clean source control project, check out my working .gitignore file for .NET projects. Since this is using a Gist, you can fork it (create a copy for yourself) and edit it with your own ignore patterns, if you come up with any that I may have missed. I hope you find this helpful! If any of you would be interested in hearing more about using Git, please let me know!
- Posted 4 months ago
- comments[0]
- Permalink
- Digg This!