Reputation: 3803
I would like to know which is a better choice of GIT management for my project?
I have a main project that requires development on Software, Firmware, and Mobile application, the project structure is shown below:
+ MainApplication
+ Software (Visual Studio project)
+ Mobile (Android project)
+ Firmware (ARM project)
+ Document
So, do I seperate each project (software, mobile, firmware) into a single GIT repo? or I just include all projects into a single big GIT?
I have the pros and cons listed below:
Single GIT
Multiple GIT
UPDATE 1
There are really a lot of good feedback below, and I love some of the approach mention,
seperate GIT and group them together
using Git submodule
Upvotes: 4
Views: 857
Reputation: 83635
The rule I usually follow is:
This is because in git you cannot branch or tag some part of a repository (like e.g. in Subversion) - branches and tags are always for the whole repo.
So the question is: Do you always release all parts together? Or are they developed and released separately (maybe even with different version numbers)?
Upvotes: 2
Reputation: 20148
The pro argument about "fragmented" repositories (and it's con counterpart) doesn't hold it's ground.
I can track all the projects at once, and it is not fragmented and easier for me to manage
You already noted yourself: using one repository won't allow you to take properly advantage of tags and it will be hassle to tell the histories apart.
In my opinion it achieves quite the opposite. It will be harder to manage and to track.
As I see it, different repositories are the superior choice.
You have three different subprojects with more or less different history. If you somehow want to group them submodules might be the way to go, using a "main" repository for the overall project.
This "main" repository can also be used to track your Documents folder.
Upvotes: 3
Reputation: 738
Multiple projects in one git repository is an antipattern. Especially when using maven and CBI (e. g. Jenkins). And when using different versions for your (sub)projects then using the maven release plugin in combination with git is impossible. If you have the same version for all projects then this may be an indicator that you could go for the one repo solution. But I advise against it. We decided to use one repository for multiple related projects with good reasons but I would never do that again.
About submodules and other solutions: that depends on how familiar with git you are. If git is new for you do not underestimate the learning curve even without submodules.
This question is quite similar to yours.
Upvotes: 1
Reputation: 95
I think, will be good for multiple GIT projects. (Not sure again a choice, as Pros and cons mentioned above) Reason which I am thinking on is: In future I got any requirement which only needs a change in Mobile project for example then you not need to worry about changes/ branching/ deployment for other projects. you can easily proceed with changing one project and remain same for others.
Upvotes: 0