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

In my repo I have 3 closely related mini projects: 1 server and 2 clients. They are all quite small (<3 files each). Since they are so small and so closely related I just dropped them in folders in one single repo. However now that I know I can't clone a single directory in my VCS of choice (Mercurial), I'm considering splitting them up.

However I'm confused about general best practice: Is it okay to put different small projects in different branches, or should they all go in different repos?

I'm currently leaning towards branching since I can't easily splice out the file history of the different projects but then your using a feature in a way it wasn't meant to be used.

share|improve this question
I'm 100% sure if this goes on SO or here. I choose here because its highly subjective and is general enough to apply to multiple VCS's. – TheLQ Feb 6 '11 at 21:04
up vote 1 down vote accepted

Forme this really depends on how "connected" the mini projects are. If one changes do the others need to be changed as well to handle say a change to the database scheme?

If the answer is yes then I would keep them together in the repository, otherwise each could live in it's own repo.

Branching i don't believe is the right metaphor for your problem.

share|improve this answer
I don't really want to split them up into multiple repos due to how difficult it is to migrate the history of a file and the fact that the projects are really small. It just feels heavy to give each project its own dedicated repo. And to answer your question: Since this is a tightly integrated server-client project then yes, an update to the server most likely requires an update to the client. – TheLQ Feb 6 '11 at 22:04
No worries, then i'd go with keeping them in the same repo and allowing them to be branched/merged/tagged as one unit. This will help you in the future when you have a feature branch that covers more than one mini-project. – Thomas James Feb 6 '11 at 23:13

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.