出现是问题: git提交代码是出现fatal: Path 'directory/file' is in submodule 'directory''错误 Removing the directory from git and adding it again worked for me: git rm --cached directory git add directory This works if you purposefully removed the .git directory beca…