title: Git - "<directory> does not have a commit checked out" even after deleting the .git inside that directory. Cant get rid of inner git repo
body: <p>Alright this is gonna be a bit confusing but please bear with me. Still getting used to git and Im struggling. So. The sequence of events were as follows (very hectic so ill summarise)</p>
  <p>I have a project with backend and frontend. the frontend directory has a react app (<code>frontend/financee-app/</code>) which by default has a <code>.git</code> initialised in it.</p>
  <p>But my dumb self forgot to delete that inner repo before initialising a git repo for the whole project and committing and pushing my code.</p>
  <p>So naturally, i couldnt open that react app folder on github cuz from what i learned till now is that its now a &quot;submodule&quot;? Which means theres a git repo within a git repo.</p>
  <p>But after so many struggles and messing up my files, i replace my files with the backup files i had for this exact reason which have pretty much the same file structure as what i originally committed. BUT i made sure there is no inner git repo in the react app this time.</p>
  <p>So i git pull my code to see what the differences are, it tells me theres three conflits. Two in two files. Which i fix, no problem. The third conflict is the freaking react app directory. Idk how to fix it so i just fix the other two, make sure i dont have a git repo in that app directory, and then i finally <code>git add *</code>.</p>
  <p>Annnd. An error.</p>
  <pre><code>error: 'frontend/financee-app' does not have a commit checked out
  fatal: updating files failed
  </code></pre>
  <p>Searching everywhere about that error, everyone keeps saying to delete the inner git repo. BUT I ALREADY DID. Is it detecting the one that i mistakenly pushed the first time that caused all these issues? What if i want to get rid of it for good. I just want to commit this new folder that doesnt have the git repo inside. I swear thats all i wanna do. Why is this so hard.</p>