I mistakenly added files using the command "git add dir". I have not yet run "git commit". Is there a way to remove this dir and everything contained within it from the commit?
I have tried
git reset dir
git reset file
To unstage an entire directory including all its content,
git rm --cached -r dir
--cached switch makes
git rm operate on the index only, and
-r is for “recursive”.