http://www.douban.com/group/topic/32935166/

芽衣

git rm –cached filename git commit -m “hehe” git push origin branch

cloudaice

上面的一些解法只是保持以后不会跟踪了,要想彻底删除的方法如下:

git filter-branch –index-filter ‘git rm -r –cached –ignore-unmatch path/to/your/file’ HEAD

git push origin master –force

rm -rf .git/refs/original/

git reflog expire –expire=now –all

git gc –prune=now

git gc –aggressive –prune=now