Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Previous related questions:


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?

share|improve this question
" only my commit messages give hints indicating whether I'm working on my Swing app or my Android app" I am not sure what you mean. Do you need long-term indication to which folder you were working at which time? If so have you considered low-tech solution - introducing different structure to commit from different folders and then parsing "git log". – Vorac Sep 27 '12 at 7:03
up vote 2 down vote accepted

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.