1

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.

asked Feb 6, 2011 at 21:04
1
  • 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. Commented Feb 6, 2011 at 21:04

1 Answer 1

1

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.

answered Feb 6, 2011 at 21:38
2
  • 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. Commented Feb 6, 2011 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. Commented Feb 6, 2011 at 23:13

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.