You cannot avoid the extra folder from the submodule, but you can add a symbolic link (even on Windows) in order to find the content you want.
Add your submodule with its repo name:
git submodule add -b master /url/of/repo
Add a symlink:
ln -s repo/src common
Don't forget to add the '-b master
' if you want your repo to follow its master
branch.
This is possible since git 1.8.2: see "git submodule
tracking latest".
Even the Git 2.25 and its git sparse-checkout
command would not avoid the extra folder level "common
".