Do you feel comfortable merging code?

前端 未结 18 2416
心在旅途
心在旅途 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条回答
  •  忘掉有多难
    2021-01-31 04:52

    The branching problem is why I use a Distributed Version Control system (Git in my case, but there are also Mercurial and Bazaar) where creating a branch is trivial.

    I use short lived branches all the time for development. This lets me mess around in my own repository, make mistakes and bad choices, and then rebase the changes to the main branch so only clean changes are kept in history.

    I use tags to mark frozen code, and it is easy in these systems to go back and branch off these for bug fixes without having a load of long lived branches in the code base.

提交回复
热议问题