I'm used to do this when I want to rollback changes in a directory:
$ git checkout path/to/dir/
But now I need to remove files that have been created (not modified) in that dir, and checkout didn't work. What can I do?
I'm used to do this when I want to rollback changes in a directory:
$ git checkout path/to/dir/
But now I need to remove files that have been created (not modified) in that dir, and checkout didn't work. What can I do?
git clean -f
or git clean -f -d
if you also want to remove directory. Source
Also check out the official documentation