We are currently reworking a big part of our code base. We choose to create a separate branch for this since the rework will take several months and we should be fixing bugs and updating the default with new features in the meantime. Obviously we want our rework branch not drift away from the default too much.
We decided to merge the default into the rework branch once every month. This should solve our problem and save us from a hell of a merge after a couple of months when we want to merge our rework branch in the default.
Today we merged the default for the second time in our rework branch (2 months passed since the start of the rework), but I noticed something strange during the merge. It seems like the merging we did the first time (a month ago), we had to do it again开发者_开发百科 today. If so, then we aren't winning any time with merging every month and we could as well postpone it to the end of the rework. But is my assumption right: if I merged the default into a branch and after some time again I merge the default again in that branch, it doesn't matter if I merged it the first time? The work for the second merge stays the same, we could as well leave the branch alone and do a big merge in the end?
What makes you think the first merge "didn't work"?
The second merge will only have to "merge" the delta between where default is now and where it was when the first merge occurred.
Also depending on the amount of work being done in both branches, I would say that merging once a month is a very long time period to keep the branches out of sync.
As a side note, if you want to keep the history prettier, you could just rebase instead of constantly merging (keep in mind that if the rework branch is being pushed/pulled, it's a no-go).
精彩评论