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)
I have a project with backend and frontend. the frontend directory has a react app (frontend/financee-app/
) which by default has a .git
initialised in it.
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.
So naturally, i couldnt open that react app folder on github cuz from what i learned till now is that its now a "submodule"? Which means theres a git repo within a git repo.
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.
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 git add *
.
Annnd. An error.
error: 'frontend/financee-app' does not have a commit checked out
fatal: updating files failed
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.