Git repos attachments

I would like to ask the community what is best for embedding git repos for my example. There are two of us who will be working on the same project that shares code assets. In this project, many small projects will be implemented in which everyone will have the same assets (depending on them). The folder structure will look like this:

main_project
 - assets
 - project_1
 - project_2
 - project_3 

Is there a way to have version history for main_project and resources inside and ignore project folders inside and have a separate version control history for each individual project?

If this is not possible, then what is best for such a scenario.

tnx Luka

+4
source share
2 answers

submodules, , , . , ( ), , , , .

, , : , , git. , . ( , , .., git).

Edit:

@gorilly ,

+2

- . . , .

main_project
.gitignore
- assets
- project_1
-- .gitignore
- project_2
-- .gitignore

main_project/.gitignore ( , git ):

project_1/*
!project_1/.gitignore
project_2/*
!project_2/.gitignore

project _ */ .gitignore , , , main_project.

git init project_1 project_2 .

, :

main_project
- assets
project_1
- assets -> ../main_project/assets/
project_2
- assets -> ../main_project/assets/
0

All Articles