事件顺序
- 添加文件 A -- commit1
- 一般操作 -- commit2~9
git rm --cached A并把 A 添加到 gitignore -- commit10git rebase -i commit2. 保持 commit10 不变- 回放 commit10 时, 文件 A 就丢了...
事件顺序
git rm --cached A 并把 A 添加到 gitignore -- commit10git rebase -i commit2. 保持 commit10 不变复现步骤总结错了.
实际上是
git rm A # and ignore A -- commit10
mv /some/other/file A
这个A没有备份的话, 应该真的找不回来.