What's the difference between SVN and Git for merging?

后端 未结 2 1775
悲哀的现实
悲哀的现实 2020-12-13 02:47

As the title suggests, I am curious as to why so many people tout Git as a superior alternative to branching/merging over SVN. I am primarily curious because SVN merging suc

2条回答
  •  独厮守ぢ
    2020-12-13 03:36

    That is called on merge with conflict, and no VCS will ever solve that for you.
    You will have to manually solve the merge yourself.

    As mentioned in Why merging in git is better than SVN, the actual difference is in the history recording of commits:

    • linear for SVN
    • DAG (Directed Acyclic Graph) for Git

    That allows Git to remember what has already merged, reducing considerably the conflicts occurrences.

    DAG

    So, when it comes time to do merge from 5b over to the (a) branch, we can use information in the DAG to know that 3b and 2b are already done


    So it is the merge workflow that Git will handle much more gracefully than SVN:
    See Merge Git vs. SVN for concrete examples.

提交回复
热议问题