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.
-
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– TheLQ2011年02月06日 21:04:44 +00:00Commented Feb 6, 2011 at 21:04
1 Answer 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.
-
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– TheLQ2011年02月06日 22:04:04 +00:00Commented 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.Thomas James– Thomas James2011年02月06日 23:13:28 +00:00Commented Feb 6, 2011 at 23:13