user345566
user345566

Reputation:

Are merges in Git different than in Mercurial?

Hopefully, this isn't a loaded question. I'm a longtime user of hg, and it's meeting our needs quite well. Lately I have been working with a consultant and he keeps going on about 'managing several repos and pushing/pulling/merging them is easier' than hg. More specifically, I believe he means that pushing changes to a remote repo is the easier part. Not really knowing much about Git, I didn't want to tell him there's not much difference. I was under the impression that in both systems, pushing and pulling almost always involved merging if changes from several sources occur on the same file.

Can anyone help clarify what he may mean? His contract ended before I got around to thinking about asking him to expand on what he said.

PS I've read these comparisons and they didn't specifically address my question:

Important Shock: Git vs. Mercurial, Please Relax

Rockstar Programmer : The differences between mercurial and git

Steve Losh: The real differences between mercurial and git

Upvotes: 5

Views: 293

Answers (2)

Jakub Narębski
Jakub Narębski

Reputation: 323464

Take a look at the following questions on SO and their answers:

They are more about branching than merging and managing (access to) remote repositories, but they should help.

Upvotes: 1

mipadi
mipadi

Reputation: 410662

I think the keyword in his statement, "Managing several repos and pushing/pulling/merging them is easier," is and. In Git, it's very easy to create a bunch of "named" remotes -- remote repos that you can refer to with a name. It's also easy to pull in branches from a remote and keep them in your repo; these branches are essentially namespaced under the name of the remote, so it's easy to group remote branches together and so forth. In other words, it's easy to track multiple remote repos and pull changes from them into your own repo.

I haven't used Mercurial much since about v1.0, so I don't know if this is possible in Mercurial now or not; it wasn't the last time I checked out Mercurial, as far as I know.

Upvotes: 3

Related Questions