3

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?

ChocoDeveloper
  • 14,160
  • 26
  • 79
  • 117

1 Answers1

5

git clean -f or git clean -f -d if you also want to remove directory. Source
Also check out the official documentation

Community
  • 1
  • 1
ThanksForAllTheFish
  • 7,101
  • 5
  • 35
  • 54