 <pre><code>git filter-branch -f --index-filter 'git rm --cached --ignore-unmatch *.sql' </code></pre> <p>Note: Replace *.sql with your file name or file type. Be very careful because this will go through every commit and rip this file type out.</p>