Pages - Menu

Monday, March 4, 2013

Removing untracked files from Git working copy

Today I had to remove some untracked files from my git working copy and it turns out to be really simple.

Days ago I was deleting those files by hand, what is really stupid unless you want to keep some of them (not my case).

The solution is: clean

git clean -d -f

The -f option will force git to clean the untracked files.
The -d option will remove the directories too.

No comments:

Post a Comment