I want to remove all my local changes and revert to the repo version with Git. I've created new files which I haven't added or committed.
I've tried this command but it doesn't delete the new files I've created.
git reset --hard
I want to remove all my local changes and revert to the repo version with Git. I've created new files which I haven't added or committed.
I've tried this command but it doesn't delete the new files I've created.
git reset --hard
Just delete the new files manually or execute git clean -f and after that execute git stash
git clean -fdx will delete (recursively) all unversioned files. You can use this in tandem with git checkout -- or git reset --hard to get a completely clean version of your repo.