good idea to run 'git clean -nd' to preview the changes before running git clean to ensure you dont have untracked files or directories that you care about that will be removed.
–
jpwynnJul 14 '13 at 5:13

5

Save someone a trip to the docs: -f is force, -d is remove directories, -n is dry run (also --dry-run; show output without doing anything yet)
–
Aaron CampbellJun 4 at 21:07

hhmm... I did that but my files are still there. Should I do something after ?
–
MEMApr 27 '11 at 16:22

1

git reset only reverts the uncommited changes in the working tree. It will not remove the new files and folders. I am not sure how to do that with git
–
JosnidhinApr 27 '11 at 16:38

1

So, if we change a system directory by adding new files and folders, and then we want to revert that directory to a previous state (w/out those files and folders), we cannot do that with git ? So the best we can is to revert file states ? But once we create a file, we can't remove that file unless we do it manually ?
–
MEMApr 27 '11 at 17:37