我按照 Github 上的说明进行操作(https://help.github.com/articles/remove-sensitive-data/ https://help.github.com/articles/remove-sensitive-data/)来整理凌乱的存储库。我已经使用成功清除了所有 .csv 文件
git filter-branch --force --index-filter \
'git rm --cached --ignore-unmatch *.csv' \
--prune-empty --tag-name-filter cat -- --all
现在需要删除所有 .docx 文件。但是,当我对 *.docx 使用完全相同的命令时,我收到一条错误消息:fatal: bad revision ' --prune-empty'
我推送到了 github 上的原点,并在进行第二批更新之前克隆了一个新副本。我不确定我做错了什么/不同的地方导致了这个错误。非常感谢任何帮助:)
Git 应从 cmd.exe 或 bash 运行。
问题是使用'
在你的指挥下。 Windows 只使用"
。
您正在寻找的命令是:
git filter-branch --force --index-filter \
"git rm --cached --ignore-unmatch *.csv" \
--prune-empty --tag-name-filter cat -- --all
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)