Previous related questions:
-
Code bases for desktop and mobile versions of the same app
-
Git branching and tagging best practices
Question:
I have split my repo into three directories (swing, android, and common) as suggested by @KarlBielefeldt in response to my previous question. Now I am jumping back and forth between developing my Android port and tweaking/adding features to my original Swing app. All of my commits are linear (fast-forward) and only my commit messages give hints indicating whether I’m working on my Swing app or my Android app. Is there a better way to keep track of the work flow in my git repo?
1
For the most part I would expect to be able to do well enough with targeted log commands. For example, running
git log path/to/android
If it were me I would look at all four areas as one project and not worry about it, but if you really want separate histories, git submodules would probably be your best bet. With this method, you would create separate git repositories for swing, android, and common. Then, you would create a fourth repository: the project repo. The project repo would then have the android, swing, and common versions as submodules that git pulls in from their separate repositories.
At this point, you have separate histories for each of your common areas.