Git: Zombie submodule -


so i've somehow managed create zombie git submodule.

$ cat .gitmodules  [submodule "source/crashprobe"]     path = source/crashprobe     url = https://github.com/bitstadium/crashprobe.git 

git thinks submodule untracked:

$ git status on branch master branch up-to-date 'origin/master'. untracked files:   (use "git add <file>..." include in committed)      source/crashprobe/ 

deinit doesn't work:

$ git submodule deinit source/crashprobe error: pathspec 'source/crashprobe' did not match file(s) known git. 

nor this:

$ git rm --cached source/crashprobe fatal: pathspec 'source/crashprobe' did not match files 

... despite fact that:

$ ls .git/modules/source/crashprobe/ fetch_head      gitdir          objects head            hooks           packed-refs branches        index           refs config          info            sourcetreeconfig description     logs 

nor this:

$ git config -f .git/config --remove-section source/crashprobe fatal: no such section! 

... despite fact that:

$ cat .git/config ... [submodule "source/crashprobe"]     url = https://github.com/bitstadium/crashprobe.git 

that exhausts answers i've seen far, question is: how out of mess , have proper submodule?

try remove submodule file , declaration manually.

  • edit .gitmodule remove source/crashprobe.
  • delete source/crashprobe folder (simple delete, no git command needed, since untracked anyway)
  • check .git/modules folder remove source/crashprobe trace in it.

once done, add , commit (to clean state).

and try git submodule add command again

git submodule add -- https://github.com/bitstadium/crashprobe.git source/crashprobe 

Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -