How do I remove new files from a directory?

I use this when I want to discard changes to a directory:

$ git checkout path/to/dir/

      

But now I need to delete files that were created (not changed) in this directory and the check didn't work. What can I do?

+3


source to share


1 answer


git clean -f

or git clean -f -d

, if you also want to delete the directory. Source
Also check out the official documentation



+5


source







All Articles