Git 修复使用过滤器分支后的意外合并

Git 修复使用过滤器分支后的意外合并,git,Git,我按照说明使用filter branch从我的repo中删除了一个二进制文件。文章的结尾说 Make sure your collab uses rebase and not merge, otherwise he will just reintroduce the file and the entire tainted history… 不幸的是,有人在回购协议上使用了合并后,我读到了这一点。现在我的历史记录有很多重复提交: commit 16c3838a7338c639421b9f244b

我按照说明使用filter branch从我的repo中删除了一个二进制文件。文章的结尾说

Make sure your collab uses rebase and not merge,
otherwise he will just reintroduce the file and the entire tainted history…
不幸的是,有人在回购协议上使用了合并后,我读到了这一点。现在我的历史记录有很多重复提交:

commit 16c3838a7338c639421b9f244b572b6e23c0c3f7
Author: foo bar <foo@bar.com>
Date:   Mon Nov 7 13:20:28 2011 -0800

    update todo

commit 213ae8da0af8e92afa9808c3b16cecf0e1cc7a0c
Author: foo bar <foo@bar.com>
Date:   Fri Nov 4 21:14:08 2011 -0700

    update todo
提交16c3838a7338c639421b9f244b572b6e23c0c3f7
作者:富吧
日期:周一11月7日13:20:28 2011-0800
更新待办事项
提交213ae8da0af8e92afa9808c3b16cecf0e1cc7a0c
作者:富吧
日期:2011年11月4日星期五21:14:08-0700
更新待办事项

在这些重复提交中引入了二进制文件。如何消除重复提交和二进制文件?

只需返回一个版本并重新设置基础。

如果没有任何帮助,并且您还没有运行垃圾收集,您可以随时撤消使用
git reflog
所做的操作。