GIT vs Mercurial

Started by
31 comments, last by Alberth 8 years, 1 month ago

Hello,

I haven't used GIT in a couple years. After reading lots of forum opinions, I have read little which directly compares these two software. Please share your viewpoint about them.

My plan is to use a version control software as an indie for a couple years then add a few people, but I want to really know my stuff before others get involved. I know that there are a few others out there. Please feel free to comment on them, too.

Personal life and your private thoughts always effect your career. Research is the intellectual backbone of game development and the first order. Version Control is crucial for full management of applications and software. The better the workflow pipeline, then the greater the potential output for a quality game. Completing projects is the last but finest order.

by Clinton, 3Ddreamer

Advertisement

I hate both. But I hate Git less and there's a large community based around it, GitHub being ground zero. For ease of use and all around sanity, Subversion is still vastly superior. Subversion also goes ballstic and then implodes on most branch merges, though. Git will hassle you constantly, about inane bullshit they could've easily fixed. Once in a while it will detonate more seriously. But the issues are manageable, and you gain a very capable and flexible version control system. Light history editing (particularly commit messages) and sane merges are fantastic to have. Git's also finally starting to grapple with large file management seriously, but another option is simply to run those things out of Subversion.

Mercurial doesn't support partial/cherry picked commits, on purpose. You have to play games with shelving extensions and other nonsense. I assume this is great for web developers or something. As far as I'm concerned, this is so far out of touch with normal software development that I refuse to deal with it.

SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.

I actually agree with Promit about Subversion. If you're not worried about branching, Subversion is probably suitable and much simpler to use.
I disagree with him about Git and Mercurial. As I develop almost exclusively on and for Windows, I find it easiest to use Mercurial. It's been available on Windows for much longer than GIT and the GUI-based tools are of higher quality (I know, I know, "real" programmers use CLI. I wanted to use CLI for everything I'd be on Linux. >.>).

If you want a real comparison of them... there's not a huge amount of difference in my opinion, and the little differences are probably too many for me to list. Mercurial has (or maybe just had) better support on Windows, while GIT enjoys much more use and has a much larger community, and that's probably the differences that will make your mind for you.

Talking about branching, do you mean minor code [extensions] and applications or a version fork? Long term, I will be slowly developing both.

Personal life and your private thoughts always effect your career. Research is the intellectual backbone of game development and the first order. Version Control is crucial for full management of applications and software. The better the workflow pipeline, then the greater the potential output for a quality game. Completing projects is the last but finest order.

by Clinton, 3Ddreamer

I prefer:

Centralized: Perforce over Subversion.
Distributed: Git over Hg.

The Git learning curve is absolutely terrible, though. I've been using it for four years and there's still things I run into that make me say "what the hell, git?" Git lets you shoot yourself in the foot with almost every single command, and overloads commands seemingly for no reason other than to make it easy to accidentally pick the wrong use of that command. Try to avoid the CLI at all costs and do things in a good GUI.

The third-party GUIs in order from best to worst: TortoiseGit, Visual Studio 2015's integrated Git interface, SourceTree, and way behind everyone else: SmartGit.

My only real, technical complaints about Git are: submodules and large files need some major reworking. Submodules COULD be handled much more conveniently than they are and would make my life much easier. Large files are common in games and without mitigation strategies like recreating a new repo every year, you end up with 30 gig repos for a 500 meg game.


recreating a new repo
What are you saying? That sounds like a lot of debugging.

Personal life and your private thoughts always effect your career. Research is the intellectual backbone of game development and the first order. Version Control is crucial for full management of applications and software. The better the workflow pipeline, then the greater the potential output for a quality game. Completing projects is the last but finest order.

by Clinton, 3Ddreamer

Talking about branching, do you mean minor code [extensions] and applications or a version fork? Long term, I will be slowly developing both.

version forks, mostly. You may find yourself doing a version fork to improve some side application or code extension too, though, so it could be all of the above.

If you're going to be making forks, GIT and Hg both handle these much better (in my limited experience with merging forks) than Subversion. Based on this comment, I would not recommend subversion.


Centralized: Perforce over Subversion.

I've never used Perforce. Based on some quick looking it doesn't seem to provide significant benefit over Subversion. Is merging branches better or something?

Talking about branching, do you mean minor code [extensions] and applications or a version fork? Long term, I will be slowly developing both.

Git is so good at branching that you can use it for everything. Technically you're forced to. When you commit locally, you're committing to your own branch of the server. To share your work with others, you need to merge your local branch with the server's branch, or your co-workers branch directly.
Once you get comfortable with it, you can explicitly create new branches when you're working on a new feature, allowing you to quickly switch back to the last good/working version and do some hotfixes, before switching back to your feature branch.
Yes, it's also useful for 'tagging' particular versions, in case you have to go back and work on a patch for a released version of the product.

In subversion, branching is so horribly painful that no one does it, except when forced to laugh.png

FWIW though, because Git sucks at large/binary files... all this branching goodness is only useful to your programmers. Putting art assets into Git is not a very good idea at the moment. Git is also so complicated that I'm not sure that I'd even want a non-programmer to try and use it ohmy.png

I've never used Perforce. Based on some quick looking it doesn't seem to provide significant benefit over Subversion. Is merging branches better or something?

Yes, and it can do a bunch of other stuff, e.g. something similar Git's submodules but actually good, and supports semi-decentralized models, where you can set up a local server to be a proxy of the remote server (something that's common with game dev and multiple offices).

Perforce is also compatible with Git! If you've got Git fanboi programmers on your team, they can actually use git to talk to the Perforce server.

I've never used Mercurial, so I wont comment on that.

I've used Git and hated it. Also, it's completely useless for projects with large amounts of source data. I think Git must be great if you're a command-line junkie, working by yourself, and have lots of source code with little data. But otherwise... not that great.

Just use Perforce. It's the best all around version control system for games, it's proven, it can deal with small and large projects equally well, and it's free for small groups up to 20 people. There's no reason to not use it.

I've never used Perforce. Based on some quick looking it doesn't seem to provide significant benefit over Subversion. Is merging branches better or something?


Pros:
- It doesn't create .svn folders everywhere.
- It's more robust and is easier to figure out what to do when something unexpected occurs.
- Client specs are awesome.

Cons:
- Kind of a pain to use for personal projects with remote backups compared to git or svn. With git, there isn't really a server so much as remote locations you can push to if you want. SVN has various online hosting services. I don't know if there are any free private cloud services for Perforce due to its license. I haven't used Perforce in about 5 years, so something could be out there by now.

This topic is closed to new replies.

Advertisement