====== completely remove a file from all revisions ====== If you've added a file to a .gitignore list and it still shows up for commits, you can ignore it from that point on by removing it with this: git rm --cached If you find a file that should never have been committed into the repo, you need to do more than this. Adding the file to a .gitignore list doesn't get rid of it for you, and you want the file to disappear from everything. (probably a good idea to back up repo before doing this) **method 1** git filter-branch --index-filter 'git rm --cached ' HEAD **method 2** git filter-branch -f --index-filter 'git update-index --remove filename' HEAD ===== External Links ===== * http://www.gitready.com/beginner/2009/03/06/ignoring-doesnt-remove-a-file.html * http://github.com/guides/completely-remove-a-file-from-all-revisions