Do you use distributed version control?

前端 未结 18 1525
渐次进展
渐次进展 2020-12-08 07:08

I\'d like to hear from people who are using distributed version control (aka distributed revision control, decentralized version control) and how they are finding it. What a

18条回答
  •  暖寄归人
    2020-12-08 07:23

    I've been using Mercurial both at work and in my own personal projects, and I am really happy with it. The advantages I see are:

    1. Local version control. Sometimes I'm working on something, and I want to keep a version history on it, but I'm not ready to push it to the central repositories. With distributed VCS, I can just commit to my local repo until it's ready, without branching. That way, if other people make changes that I need, I can still get them and integrate them into my code. When I'm ready, I push it out to the servers.
    2. Fewer merge conflicts. They still happen, but they seem to be less frequent, and are less of a risk, because all the code is checked in to my local repo, so even if I botch the merge, I can always back up and do it again.
    3. Separate repos as branches. If I have a couple development vectors running at the same time, I can just make several clones of my repo and develop each feature independently. That way, if something gets scrapped or slipped, I don't have to pull pieces out. When they're ready to go, I just merge them together.
    4. Speed. Mercurial is much faster to work with, mostly because most of your common operations are local.

    Of course, like any new system, there was some pain during the transition. You have to think about version control differently than you did when you were using SVN, but overall I think it's very much worth it.

提交回复
热议问题