Answer the question
In order to leave comments, you need to log in
Subproject to a separate repository
Hello. There is a problem, I do not know how and whether it can be solved at all.
There is a project like
./A/1.txt
./A/2.txt
./B/3.txt
./4.txt
This project is in the git repository and everything is cool. But there was a need for git push to put directory A in addition to the main repository into a separate repository. Naturally, when pulling, it would immediately pick up changes from 2 repositories. Question: is it possible to do this in git, if so, how?
Answer the question
In order to leave comments, you need to log in
There are 2 options:
1. Separate A into a separate submodule. When changing, you will have to make commits and pushes 2 times: for A and for /.
2. Using git subtree to create a read-only copy of folder A.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question