mv subfolder subfolder_tmp git submodule deinit subfolder git rm --cached subfolder mv subfolder_tmp subfolder git add subfolder