Git workflow for two tight-knit projects

Posted by Pioul on Super User See other posts from Super User or by Pioul
Published on 2014-05-31T13:52:24Z Indexed on 2014/05/31 15:33 UTC
Read the original article Hit count: 138

Filed under:
|

Two very similar projects

I'm maintaining an online Markdown editor using Git as RCS (and accessorily made available on GitHub).

From this web app, I've created a Chrome app: the code is the same, aside from some Chrome technicalities.

I care about open sourcing these two projects. Still, the Chrome app's code being the same as the web app's except for some dull details, I've first chosen to (1) not publish the Chrome app on GitHub, and (2) not use Git to manage its code. Instead, I would manually review the web app's commits, then replicate the few changes in the Chrome app.

… slightly drifting apart

However, I've decided to add a feature to the Chrome app only. So, even though both codebases will remain broadly similar, they'll be diverging enough to make me reconsider the rationale behind my initial decision to not version control nor share the Chrome app's source code.

Since I'm now willing to use Git to version control both apps, and that I want to share both of them on GitHub, how should I go about it?

  1. Should I use two different repositories, or one repo with two long-running branches? What would be the pros and cons of each approach in that context?
  2. What would be the easiest/fastest way to regularly "import" commits from the web app to the Chrome app, since the web app is going to remain the master branch? Is cherry-picking the only solution?

© Super User or respective owner

Related posts about git

Related posts about Workflow