Tuesday, March 08, 2016

List Untracked Files in Git

git ls-files --others --exclude-standard

You can chain this to xargs:

git ls-files --others --exclude-standard | xargs git rm

to remove those files.