I've been wondering what is the better DVCS for .NET developers? From reading various information it has sounded like Mercurial works better on Windows, but other information claims that Git has caught up and surpassed Mercurial in offering quality Windows and Visual Studio tools. Does anyone have good recent information or experience with trying both in a .NET development environment?
Git Is Better for Experienced Users Mercurial depends on your level of technical expertise. Mercurial may be safer for less experienced users, but Git can offer ways to enhance safety (once you know what you are doing).
"Mercurial features and repositories will be officially removed from Bitbucket and its API on June 1, 2020." On February 1, 2020, users will no longer be able to create new Mercurial repos.
In 2013, Facebook adopted Mercurial and began work on scaling it to handle their large, unified code repository. Google also uses Mercurial client as a front-end on their cloud-based 'Piper' monorepo back-end.
GitHub, SVN (Subversion), Bitbucket, Perforce, and Mercurial are the most popular alternatives and competitors to Git.
I have been using Mercurial for over a year now for doing .NET development, and it has been working out great. I do admit I don't use any of the fancy tools (explorer add-ons and Visual studio tools), but they are available (e.g. TortoiseHg). I have found that using the command line tools is just as easy - just specify a few wildcards in .hgignore (as in Blaenk's answer) and you're good to go.
I'm not sure how well git integrates with hg, but for the reverse siutation I have used hg-git in the past and it worked fine. It is however still somewhat unstable as new releases of hg come out.
So you should be able to use github from mercurial, and for native mercurial repos there is always the (imo) equally nice bitbucket.org. Edit: Note also that codeplex, which is focused on .NET open source projects, now offers Git and Mercurial repositories.
And I should mention that "popularity" is a very difficult criterion to base your choice on. Either DVCS has high-profile users. Git has the linux kernel, of course, while notable hg users include the mozilla and Python projects.
EDIT: Since this seems to get regular upvotes. Everything I wrote above was true at the time of writing, but I no longer agree with my former self bitbucket is as nice as GitHub. GitHub has better functionality, and from my point of view (mostly F# open source development) everyone else is there so you get much better network effects. I moved all my project from codeplex/bitbucket to GitHub a while ago and immediately started getting contributions, whereas on codeplex/bitbucket next to nothing happened.
I think that given git's exponential popularity growth, git's good support for windows (akin to that of subversion's with something like tortoiseSVN) is bound to arrive, it is only a matter of time. The two projects that seem to be the most popular are msysgit, and TortoiseGit (also uses msysgit) which is similar to tortoiseSVN. git keeps becoming more and more popular, that if you were to run into any problems which is unlikely now and is becoming even more unlikely as git tools on windows become further developed, you will be able to find fixes a lot easier due to the large userbase.
In the meantime, I have found this series of guides to be very helpful.
Issues you might run into may be ignoring certain files, which should be easy if you lookup how to use .gitignore
, which is really straightforward, here is the list of files and wildcards that the series mentions:
obj
bin
_ReSharper.*
*.csproj.user
*.resharper.user
*.resharper
*.suo
*.cache
*~
*.swp
Also I have seen some issues regarding line endings. For that, you will want to check out this question.
At the time of writing, I've used both TortoiseGit and TortoiseHg (for mercurial) in different projects, dominantly java and .net projects. I have to say that TortoiseHg is in the lead as it is much more stable and fully featured of the two.
There is a Mercurial plugin for Visual Studio 2008, but I'd suggest sticking with TortoiseHg until the plugin itself is stable. Not sure about integration with git, but there is some talk about a plugin for VS here.
Although git is a natural draw for unix/linux users, it has been getting better for windows and .net users. mercurial however, may be a better choice between the two. unlike centralized dev, where there's a plethora of choices, there are very few "true" dvcs tools out there. as far as i know, there's only one commercial system, plastic scm and the two aforementioned oss tools. i have come from the clearcase side and have experience with pvcs, p4 and other traditional scm tools. i tripped upon plastic, maybe through this site and from what i have evaluated, seems to do well from a visual standpoint. if you're more of a windows shop as you say, it may be plastic, mercurial, and git in that order. if you're more unix/linux, git is probably the first logical choice. hope this helps!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With