Maintaining my git repository.

Dirk Hohndel dirk at hohndel.org
Fri Jan 19 02:48:53 PST 2018


> On Jan 18, 2018, at 5:27 PM, Willem Ferguson <willemferguson at zoology.up.ac.za> wrote:
> 
> I have a question that deals with maintenance of my local master branch within the context of additional local development branches. Let's say I have two local development git branches DEV1 and DEV2. While I am working on those branches, there is an update from origin, that is, the master on the Subsurface github repository is updated through merging some new patches of other contributors. Now, I can easily pull the updates from remote master, but the synchronisation of DEV1 and DEV2 becomes a problem. Now, there are two cases:
> 
> a) the code files that I have changed in DEV1 and DEV2 have not been affected by the most recent merge.
> 
> b) there is a conflict.
> 
> What is the most sane way of keeping DEV1 and DEV2 in sync with master?

Unless there is a reason to do so (i.e., you need one of the changes that went into master in order to work on your code), the most sane thing to do is not to bother with it. Leave your dev branches as they are.
Github is quite good at merging. I'm getting better at it, and if all else fails we always have the Deity of git merges at our service here (obviously Linus does all the libdivecomputer merges, but I've also asked him once or twice to help me with complex merging of older Subsurface development branches - and he's insanely good at this).

So in most cases, the risk of messing things up and creating a branch that is actually harder for me to merge, just leave things as they are.

Makes sense?

/D 


More information about the subsurface mailing list