[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gits] best practice question
Suresh Venkatasubramanian <suresh@cs.utah.edu> writes:
> so I’m using git for a paper I’m writing. I recently branched off a version
> for a document we’re preparing for a workshop: the main document (in prep for
> a conference later on) is still in the master branch.
>
> But I’m constantly encountering things that should be in both branches (like
> relevant papers, bib entries, and common notes). so far I’ve been cherry
> picking updates as necessary, but that’s a little painful.
>
> Is there a ‘best practice’ for how to do this properly ? or should I just not
> have created a branch
Josh has already provided much good advice, I think.
It is tedious to cherry-pick lots of stuff between branches. But on the other
hand, it's really harmful. It doesn't prevent merges later on.
You could imagine having a "master branch" for shared stuff and individual
branches for individual papers. But that doesn't strike me as very workable,
since it's probably not very clear what is/will be shared and what will not.
I might be tempted to manage the variants via LaTeX rather than via git, e.g.,
"\ifworkshop blah blah blah \fi", and/or separate root files.
But I've never used the multiple-branches or systematic "\ifworkshop'ing"
appraoches to managing multiple papers. I've always just kept separate repos
for separate publications.
Eric.
--
-------------------------------------------------------------------------------
Eric Eide <eeide@cs.utah.edu> . University of Utah School of Computing
http://www.cs.utah.edu/~eeide/ . +1 (801) 585-5512 voice, +1 (801) 581-5843 FAX