Last updated
Hoping to receive a bit of advice on the best way to set up my repository.
I want to create a master repository that is going to hold documents, projects, examples, misc.
I think git submodules may be what I'm looking for but I've also seen many articles on why not to use submodules.
Essentially I want to make a folder structure along the lines of the following:
/home/git/master_repo
/home/git/master_repo/project1
/home/git/master_repo/project1/code
/home/git/master_repo/project1/documentation
/home/git/master_repo/project2
...
/home/git/master_repo/projectN/documentation
/home/git/master_repo/documents
/home/git/master_repo/code_library
/home/git/master_repo/code_library/c
/home/git/master_repo/code_library/java
I would like to set up each of these folders as repositories so that I may clone out individual parts, for instance I may want to clone just the code for project1 into my eclipse workspace, modify it and push it back. Then clone the documentation for project1 to a doc specialists machine.
I know I could accomplish this by creating sub repo's everywhere but that doesn't seem like a good idea.
Is there something fundamentally wrong with my premise of keeping this master repo? I imagine it would be useful for setting up dev/test/prod environments for me to have complete copies of the repo without going through the hassle of individually cloning all the projects and documentation.
I think the biggest question is with this setup, if I clone .../master_repo/project1/code, modify/commit and push it back, will these changes be reflected in .../master_repo/project1 or .../master_repo? Will I have to add and commit those updates again for each repo upstream?
EDIT: my apologies if I haven't found the best forum for this question