Remove directory from git but NOT local
If you want to remove this directory from git but not delete it entirely from the filesystem (local system)
In that case, you have to use:
git rm -r --cached myFolder
Remove directory from git from local as well
The below command will unstage all staged changes for the given file(s).
git reset -- <filePath>
I hope this helps!