Thread (4 messages) flat view 4 messages, 3 authors, 2016-06-15

Re: git best strategy for two version development

From: Øystein Walle <hidden>
Date: 2016-06-15 22:59:52

Carlos Pereira <jose.carlos.pereira <at> ist.utl.pt> writes:
Hello,

I am a git and CVS newbie, I bought and red most of the excellent Pro 
Git book by Scott Chacon, but I still have a doubt. I have a package 
that I distribute in two versions differing only in one library: 
version_A uses this library, version_B uses my own code to replace it. 
For strategic reasons I want to keep it this way for the time being. 
Both versions have the same documentation, the same data files, and 99% 
of the source code is the same (a few makefile changes, two additional 
files in version_B and some minor changes: a diff -r has only 170 
lines). The question is what is the best strategy to manage a situation 
like this with git?

Shall I maintain two different repositories? I don't think so...
If the changes are as small as you say, is it an option to use just one
branch but have two possible build configurations? That seems like the
easiest way to do it, in my opinion. E.g.:

    $ make LIB=versionA
    $ make LIB=versionB

Consider the above as pseudo-code, though. I don't know what build
system you use or even if your package is even something that is
"built". But you get the idea.

Øsse
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help