I have cloned a project and customized it. the project is using some extra projects as submodules. I have setup mine git repository and push the main project there. but I d
Based on @eis suggestion, you have to create a script to make all the git add
commands.
A way to do that is to create the .gitmodules
containing your needs, then parse it with a script like this one:
iterator=1;
subpaths=$(git config --file .gitmodules --get-regexp path | awk '{ print $2}');
subrepos=$(git config --file .gitmodules --get-regexp url | awk '{ print $2}');
for path in $subpaths; do
repo=$(echo "$subrepos"| sed $iterator'q;d');
git submodule add $repo $path;
let iterator++;
done