Do you feel comfortable merging code?

前端 未结 18 2027
心在旅途
心在旅途 2021-01-31 04:50

This morning, I read two opinions on refactoring.

  • Opinion 1 (Page not present)
  • Opinion 2 (Page not present)

They recommend branching (and s

18条回答
  •  梦毁少年i
    2021-01-31 04:55

    Branching might be painful but it shouldn't be.

    That's what git-like projects (mercurial, bazar) tells us about CVS and SVN. On git and mercurial, branching is easy. On SVN it's easy but with big projects it can be a bit hardcore to manage (because of time spent on the branching/merging process that can be very long -- compared to some others like git and mercurial -- and difficult if there are non-obvious conflicts). That don't help users that are not used to branch often to have confidence in branching. Lot of users unaware of the powerful uses of branching just keep it away to not add new problems to their projects, letting the fear of the unknown make them far from efficiency.

    Branching should be an easy and powerful tool we'd have to use for any reason good enough to branch.

    Some good reasons to branchs:

    • working on a specific feature in parallel with other people (or while working on other features alternatively if you're alone on the project);
    • having several brand versions of the application;
    • having parallel versions of the same application -- like concurrent techniques developped in the same time by to part of the team to see what works the better;
    • having resources of the application being changed on a artist/designers (for example in games) specific branch where the application is "stable" while other branches and trunk are used for features addition and debugging;
    • [add here useful usages]

提交回复
热议问题