Remove unneeded files from git repository using .gitignore git Posted on May 21, 2014 | by admin git rm --cached `git ls-files -i --exclude-from=.gitignore` Creds: http://stackoverflow.com/questions/13541615/how-to-remove-files-that-are-listed-in-the-gitignore-but-still-on-the-repositor Share this:Click to share on Twitter (Opens in new window)Click to share on Facebook (Opens in new window) Related