ohmybuck

Remove All Files Listed in Gitignore

June 30, 2021

From Stackoverflow

As the files in .gitignore are not being tracked, you can use the git clean command to recursively remove files that are not under version control.

Use git clean -xdn to perform a dry run and see what will be removed. Then use git clean -xdf to execute it.


Written by Oliver Smit. I love talking about web technologies, good design practices, optimising productivity, and rapid prototyping of projects. Check out my work on Github