Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git repository structure with multiple modules

I have the following situation:

  1. Have 4-5 different software modules part of a bigger software project.
  2. All of them are set as separate git repos.
  3. When i commit a feature, usually it spans more than a single module - thus making e.g. 2 or 3 commits for each module.

Give me ideas for multiple modules part of a bigger project. Do you prefer using git submodules, and if yes, in what way? Or do you use a master folder for the project, e.g.:

Software_Project
   Module_1
   Module_2
   Module_3
   Module_4

Any ideas for an appropriate git repo structure are welcome.

like image 814
Emil Petkov Avatar asked Apr 26 '11 18:04

Emil Petkov


1 Answers

Since you are saying that you commit features that usually span over several modules, I'd put everything in the same git repository, unless it's truly an orthogonal module and completely independent from the rest of the project, where instead a submodule might be appropriate. You will be happy to have the possibility to commit features the way git was supposed be used. Multiple commits in several git repositories? Nah, I'd rather have the code closer together. Well, it's a trade off like everything else.

like image 60
ralphtheninja Avatar answered Nov 03 '22 01:11

ralphtheninja