Is there a git command to revert all uncommitted changes in a working tree and index and to also remove newly created files and folders?
git clean -fd
didn't help, new files remained. What I did is totally deleting all the working tree and then
git reset --hard
See "How do I clear my local working directory in git?" for advice to add the -x
option to clean:
git clean -fdx
Note -x
flag will remove all files ignored by Git so be careful (see discussion in the answer I refer to).