开发者

Why does a successful merge break my code?

When using XCode4 I created a new branch and implemented a very small method on this new branch. I saw that the branch was working properly so I made a commit on this new branch and then switched back to my main branch. I merged the two branches开发者_开发技巧 together (the new one into my main branch). Now my project is not working.

The exact same thing happened yesterday. I never found the problem so I started over from the beginning on this current project. What is causing this?


It depends on where you started your development branch:

  • if that was from HEAD of main branch, then the merge back into main should have been a fast-forward one (i.e. main HEAD should have simply be moved at dev HEAD), and your project should have worked.

  • if that was from any commit before main HEAD (i.e. if main HEAD has moved during dev branch development), then the merge isn't a fast forward one, and you are combining (automatically if the changes in both branches are separate) two different sets of changes.
    Then the result needs to be tested and validated again.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜