vscode git problem

vscode says I have untracked files within a folder, but doesn't show any of the files in that folder as modified! Usually git lists specific files as modified, not entire folders... This is what I'm seeing: (git add . is not working)
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
(commit or discard the untracked or modified content in submodules)
modified: apps/FractionCalculator (modified content, untracked content)

no changes added to commit (use "git add" and/or "git commit -a")
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
(commit or discard the untracked or modified content in submodules)
modified: apps/FractionCalculator (modified content, untracked content)

no changes added to commit (use "git add" and/or "git commit -a")
3 Replies
TedS
TedS•14mo ago
I see an email from github showing a git log and the line: Error: fatal: No url found for submodule path 'apps/FractionCalculator' in .gitmodules I think what happened is that I copied the FractionCalculator folder into my github.io page BUT this folder also contained a .git file. This probably screwed up everything! Now I'm looking for a way to delete my local repo, create a new one, and PULL whats on the server down to it - but I can't get it to work! Might have to delete this github account, create a new one, and start over! At least I have a backup!!! What I mean by "copied" is that I copied the FractionCalculator folder into the github.io folder on my machine. Then with nested .git files everything went sideways! 🤔
Jochem
Jochem•14mo ago
You can delete the git folder in the folder you copied, which should fix this error but will also lose your history for that folder. Otherwise you'll have to read up on git sub modules, I have no personal experience with those. Make sure to make a quick backup copy if you mess with either option though Of the entire github.io folder, not just the sub folder
TedS
TedS•14mo ago
Thanks for the suggestions. I was able to delete the repo, then recreate it & go from there. It now works again. I was concerned that I wouldn't be able to create a new repo with the same name (username.github.io), like if you delete a google account you can never use that account again.
Want results from more Discord servers?
Add your server