Add submodule to the project Create subdir for submodule in the project dir Add necessary files to submodule dir In the submodule dir type the commands: git init git add . git commit -m "Initial commit" Back to project dir Type the commands git submodule add ../../<project dir>/<submodule dir>.git <submodule dir> git add . git commit -m "Add submodule" Clone project with submodules git clone <project url> git submodule update --init --recursive Remove submodule from the project git submodule deinit <submodule dir> git rm <submodule dir> git commit -m "Remove submodule" rm -rf .git/modules/<submodule>