开发者

Does branching in Mercurial work as nice as Git?

开发者 https://www.devze.com 2023-01-17 11:27 出处:网络
I have read nice things about \"branch\" in Git recently.It seems like Mercurial\'s way may be to clone a local repo?But开发者_StackOverflow社区 Mercurial has branch too.Does it work as nice as Git?

I have read nice things about "branch" in Git recently. It seems like Mercurial's way may be to clone a local repo? But开发者_StackOverflow社区 Mercurial has branch too. Does it work as nice as Git?

What about saving disk space in Mac / Linux / Windows? Do they all do links on Mac and Linux but make a copy on Windows?


Mercurial automatically creates branches whenever you commit diverging changesets, whereas Git works with an explicit branch creation model. Depending on your preferences, your development style, and your project needs, either one can be "better".


As far as i know - it's quite close but not as good as in git.

Jimmy wrote nice articles about using workflow he was used to work with git when working with Mercurial.


My understanding of Mercurial is that it allows for divergence in a single branch as well as creation of explicit branches. Say Amy and Bob are working on a project. They both pull changeset 1 and work on it, then they both commit their changes and push the changes back to bitbucket. The next time they pull, there will be two incompatible heads (changesets 2 and 3), so the default branch will need to be resolved if they want to keep the changes.

On the other hand, if Amy sets up a new branch (hg branch bestbranch), then there will still be two heads, but both Amy and Bob can work on independent changesets, resolving them at some future date.

0

精彩评论

暂无评论...
验证码 换一张
取 消