林一二2024年05月28日 02:07
Ref: help.github.com
Keywords:
Keywords:
先直接在文件系统中删除该文件,并提交一个 commit,如果不先在文件系统中删除并 commit 的话,走完以下的流程也没有任何用处。
接着下载 bfg,然后按着提示操作就好了:
brew install bfg
bfg --delete-files index.html
git reflog expire --expire=now --all && git gc --prune=now --aggressive # suggestd by bfg
如果要删除类似 glob 的文件,为防止与 zsh 的 globbing 冲突,以 $__StoryList.tid 为例,可以在 Windows/Mac 上这样:
git rm "tiddlers/*__palette.tid" -f
或者在 Mac 上这样
setopt +o nomatch
bfg --delete-files *StoryList.tid
git reflog expire --expire=now --all && git gc --prune=now --aggressive # suggestd by bfg
最后,要强制推送到 Github 上:
git push origin --force