remove file from git history
$ git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch <file path>' --prune-empty --tag-name-filter cat -- --all
$ git push -u origin master --force
$ rm -rf .git/refs/original
$ git reflog expire --expire=now --all
$ git gc --prune=now
$ git gc --aggressive --prune=now
Written by Rajesh
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
Related Tags
#git
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#