Completely remove the git submodule that causes a fatal error after renaming repo

I have an old project (RAILS) that I am trying to start and run again. I (maybe stupid, but already too late) renamed the repo for various reasons (using gem 'rename' + change github..etc).

It seems that the submodule is attached to a project (related to a minor change that was hacked into the formwizard) that refuses to play the ball. I tried almost every approach that I can find, but I just can't get rid of it.

Currently, if I try git submodule init , I get:

  No submodule mapping found in .gitmodules for path 'public/javascripts/formwizard' 

To get to this, I had to clone the old version of the repo to its original position.

Otherwise, I get

  fatal: Not a git repository at $path_inc_old_project_name 

I just want this thing to disappear and stop being connected with my main repo. Nothing I do seems to work

This solution does not work, because the submodule deinit not recognized (updated to the last git installation using homebrew).

git rm --cached path_to_submodule

Just returns

fatal: 'path_to_submodule' is outside repository i.e. the path you need is outside the repository

I know this, so I'm trying to get rid of this damn thing ...

I tried to remove every link to the old project name with the replacement find, but the git repository still seems to know where to look for this submodule.

How can I tell git to just forget about this submodule ...? (or, in fact, all submodules, as this is the only thing I have)

+4
source share

Source: https://habr.com/ru/post/1483626/


All Articles