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.
Written by Damon Davison
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
khasinski
591.1K
dmichaelavila
500.4K
Related Tags
#git
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#