문제

Let's say I create a new branch for a feature I'm working on. In the meantime, the rest of the programming team make significant changes to the master branch. How can I deal with the fact that my branch will start falling behind, making future merges difficult (almost impossible)? Do I just merge frequently? Or just create branches for small features at a time?

도움이 되었습니까?

해결책

You should be merging the master back in with your branch.

Let's say you didn't merge the master back in. Eventually when you deliver your functionality on your branch it will be merged with master. There may be lots of conflicts, both textually but also functionally, that need to be resolved. Will the 'integration person' know how to resolve those conflicts? Probably not. If you do the 'integration' then you might as well deliver a clean branch - so do the merge onto your branch first.

You can merge the master back in with your branch frequently or only just prior to your delivery. It is up to you. Doing it frequently might upset your focus; doing it once might end up being a 'big bang'.

Because branching in Git is so painless, it is generally a good idea to create branches for small features, as you noted.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top