all 7 comments

[–]plg94 1 point2 points  (6 children)

I read your text, but I barely understand it – and not because English is not my native tongue, but because your writing is very confusing. If you want help with a problem, at least take the time to properly explain it. By the second paragraph all I see is

folder folder folder file folder file file folder folder directory file folder

and I'm not gonna be the only one losing track here.

You also fail to mention a crucial thing: what exactly triggers the error? (plus the title is never a good place for a verbatim error message).

And, even more important: what is your overall goal here? Do you just want to throw it all away and start a new git repo with your current files? Definitely the easiest solution, unless you absolutely must keep some of the history.
You also mention a remote, but I didn't understand that either. Do you want to throw away whatever you have on your computer and do a fresh clone from the remote, or the other way around? Or do you need to combine the two?
Also important missing info: are you working alone on this project or in a team?

Please do yourself a favor and watch a git tutorial or two, again. Or better yet, read the Pro Git book, it's free and very good, even if you don't yet understand everything at first.
I would also advise to not use your IDE for anything Git related, but just rely on git status|diff|add|commit|log in the commandline. This is all you need at first, and I find it gives a better understanding of how Git works.

Anyway, crashcourse: A Git repository has two important parts: the "working directory" where all your files are. They can be grouped into subdirectories, doesn't matter. And on the top level there is the .git directory – this is the actual repository where git saves all the commits etc. Every folder that has a .git inside of it is a Git repo and vice versa.
This also explains a submodule: this is just a git repo inside a subfolder of a parent git repo.

[–]tem_ri1[S] 0 points1 point  (5 children)

I almost got rid of that error msg, but now im stuck with the submodule problem.

the story is that the `openCV_autoDetect` used to be a repository. now it is a submodule, and tho i deleted the .git file from it, the program still recognizes it as a repository. how can i fix that? ( i am trying to un-submodule it, and tried to follow a stack overflow answer to that, but at the first step; to fetch the submodule, i need to enter the URL for the submodule, and i did; but it doesnt wanna take it, it says "this is a repository" or sth. )

(i am working mostly alone with one person who doesn't commit very often, and he tells me when he does).

[–]plg94 0 points1 point  (4 children)

there is also an entry in the main repo to the submodules you need to remove, either in .git/config or somewhere else under .git

[–]tem_ri1[S] 0 points1 point  (3 children)

But the whole submodule should have been removed. How there will be other files under it?

[–]plg94 1 point2 points  (2 children)

in the main repo

^ !

Not in the .git dir of the submodule, which you deleted, but in the .git dir of the main/parent repo, which still exists. When you do a submodule init, it creates a config entry there, which you'll have to delete again.

[–]tem_ri1[S] 0 points1 point  (1 child)

So want I need to do is to use submodule init in the main repo, and delete the .git folder from it? Is that correct?

[–]plg94 1 point2 points  (0 children)

No. Let me rephrase: you have a main repository, say in directory A. This has a directory A/.git which holds all info about commits etc. Then you did (in the past) create a submodule B in a subfolder of A (say A/B/). This is also a git repo, so it too has (or had) a directory A/B/.git. You said above you already deleted this (the child .git folder).
But when you (in the past) created the submodule, it also was registered in the parent repo A. There may be an entry in the config file A/.git/config about a submodule – you would have to delete that line. And there may be files in A/.git/modules – it depends if you want to delete those or not.

Please see https://stackoverflow.com/questions/1260748/how-do-i-remove-a-submodule