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

I'm wondering what the best practice is for my git repository structure where I have an Android application + a web service backend. In general, I'd like to release these two independently (e.g., perf fixes to the backend with no changes to the front-end), but I am worried that if I keep these in two separate repos I'll lose the ability to see combined app + web service changes (e.g., there's a change in the APIs on the server).

What are other Android developers doing to manage their source code + release process? Should I use one git repo with separate folders or two git repos?

I should note that I'd like to set this up as push-to-deploy -- any changes to my master branch will trigger a tag and deploy.

share|improve this question
up vote 3 down vote accepted

It's two different projects, so use two different repos. It's not hard to have post commit hooks in both. Having multiple projects in the same repo just makes it messier to work on one while you're able to see the other, which leads to multiple copies, which leads to confusion.... if you're using a hosting service like GitHub you can see the changes to all the repos under an Organization (and other services have similar idioms) on one page.

share|improve this answer

2 different repos.

Any changes to API you make will have to be backwards compatible anyway, so you really don't want to be changing the API if you can avoid it.

Two repos reflects reality much better; that any old version of the app could be accessing the current version of the API, and you have to make sure that all works.

If you only use 1 repo you might start thinking "THIS version of the app is accessing THIS version of the API" and that's not what really happens.

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.