I have a project that used to contain a submodule, at path mysubmodule
. I installed the latest Git from source (1.8.3-rc2) and ran git submodule deinit mysubmodule
. I then deleted the .gitmodules
file and committed the change. I also deleted the .git
directory from the mysubmodule
folder.
I'd like to commit the files from mysubmodule
into my repo directly now, but git says there are no changes. If I type git add mysubmodule
it does nothing. If I type git add mysubmodule/file.txt
it says fatal: Path 'mysubmodule/file.txt' is in submodule 'mysubmodule'
I've also discovered if you check out a fresh version of the repo, it creates a mysubmodule
directory, despite having no .gitmodules
file. And running git submodule init
gives you a No submodule mapping found in .gitmodules for path 'mysubmodule'
error.
How do I fix this?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…