git rm -r --cached 'public' git remote set-url origin https://github.com/USERNAME/OTHERREPOSITORY.git git submodule add https://github.com/USERNAME/OTHERREPOSITORY.git public/ git ls-files --stage projectfolder