I have two git repositories that are forked of each other, and I sometimes need to import commits from one to the other.
For instance:
git-repo1 has this directory structure:
repo1/project1/src
repo1/project2/src
while git-repo2has the following directory structure:
repo2/src/
I would like to make a series of commits and create patches only for repo1/project1/srccommits that modify files in a specific subdirectory (say ), and ignore all commits that only modify files elsewhere.
Or, alternatively, generate patches for all commits, but apply only patch if it modifies files in a specific directory.
, git diff .
git .
?
Update1
( git ?) .
, , ? .