-3

If a user selects to "Discard All Changes", will this restore a deleted folder in Git for the working tree or will it delete the folder entirely?

1 Answers1

0

Issue resolved. I was concerned that if I ran the "Discard All Changes" command, my folder would be deleted entirely. I thought that was strange considering that if you visit a single file that was deleted in the folder, VS Code gives the option of restoring that file, but I wanted to undo the entire folder deletion. Since I didn't stage or commit the changes after I deleted the folder, I was able to revert the change in my working tree by running the following command:

git checkout -- path/to/folder

That command allows a user to revert changes that have not been indexed or added to the staging area.

I found this helpful https://stackoverflow.com/a/30875442/10860528