I have two Git repositories:
/api/pom.xml /jpa/pom.xml
/mailbox/api/pom.xml /mailbox/jpa/pom.xml /protocols/api/pom.xml
The second repository have a mailbox folder that has the exact same structure that the first Git repository. Due to workflow changes, I now need to work on the second repository, and need to transfer my working branches to the new repository.
I created a patch in the first one (let say on file api/pom.xml
)
and try to apply it in the second one, under the /mailbox
path. So I have only
one problem: git am
refuses to do the work, pretending that:
<file> does not exist in index
I tried directory option and -p1
option. Note: patch -p1
does the job, but I
have ~80 patch to apply in all my branches:
patch + git add + git commit
Is there any cheaper way to do it?