I have some large legacy git repository which I divided into modules. My problem is when I try to apply a patch created when we don't use submodule super-project doesn't have the track of submodule files.
Here my steps:
$ git clone [email protected]:super-project $ cd super-project $ git clone [email protected]:my_submodule $ git submodule add ./my_submodule $ git submodule init $ git submodule sync $ git submodule update $ git add .gitmodules $ git commit -a $ git am ~/patches/* Applying: <PATCH NAME> error: <PATH TO FILENAME>: does not exist in index When you have resolved this problem run "git am --resolved". If you would prefer to skip this patch, instead run "git am --skip". To restore the original branch and stop patching run "git am --abort".