Last Updated: February 25, 2016
·
503
· allolex

Remove untracked files in git

Recently saw a tip where someone recommended removing files by piping git ls-files with flags to xargs and then using rm to delete the files:

git clean -f 

will do the job more simply. Use git clean -n to do a no-op test run and see what would be removed.

http://git-scm.com/docs/git-clean