• Advertisement
Sign in to follow this  

GIT vs Mercurial

This topic is 762 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement

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.

Edited by nfries88

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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. Edited by Nypyren

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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.

Edited by Hodgman

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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. Edited by Nypyren

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement