Scott Robinson Technical Lead

Git: Remove Non Project Files from Repository

A quick tip that I always seem to forget, if you need to quickly remove any non project files form a repo, check this Stack Overflow answer out:

http://stackoverflow.com/questions/5037480/removing-non-repository-files-with-git

In short, I think I used this in the end:

git clean -df

Which removed and deleted any files not in the git index.

Found this useful? Everything here is free and stays that way. If it saved you an afternoon, you can buy me a coffee.