dreftymac
dreftymac

Reputation: 32390

two different versions of a codebase, one heavily commented and one with zero (or minimal) comments

If you have a project where the only difference in the 2 branches are the comments, what is a good workflow (assuming Git, but other ideas are welcome):

Upvotes: 0

Views: 103

Answers (2)

jkp
jkp

Reputation: 81298

It depends why you need the branch with no comments. If it is only to release to someone (or something) periodically, then I would go with the hook-script approach.

I can't see why you would have anyone working on the uncommented version if comments are available. Stripping them in a script on-demand therefore seems preferable to maintaining a branch with comments stripped (which would no doubt cause headaches on integration).

Upvotes: 1

Ofir
Ofir

Reputation: 8362

If one version has no comments, then by all means - it would be best to strip them automatically (but at the retrieval stage, not the commit). Otherwise, either merge them or keep two branches.

Upvotes: 1

Related Questions