When trying to add files to push to a git repo, I accidentally added other folders, and I can't for the life of me figure out how to clear the staging queue.
I've tried git reset, but the files are still staged. I've tried git rm --cached, but I get
fatal: No pathspec was given. Which files should I remove?
I tried git rm -r --cached, but that also gives
fatal: No pathspec was given. Which files should I remove?
I can't find any working technique whatsoever across the internet, and would greatly appreciate any and all help. Thank you.
You can use
Git Reset .as in This answer (Note the space before the period, this will restore all files).Or
Git Restore --stagedas in This answer. Either one should do the job.