I created and switched to a new branch and made some changes that haven’t been commited.
How do I return to the state of my last commit?
I used
git reset --hard HEAD
but all the changed files are still present
edit;
after running the above and then git status it says “nothing added to commit but untracked files present”.
I thought using git reset…would get rid of all the changes
git cleanremoves all files (recursively) that are not under version control, starting from the current directory.See the git clean docs for more info