【发布时间】:2021-09-14 04:30:03
【问题描述】:
在commit A中添加了一个文件hello.world,并在commit B和commit C中进行了修改。
现在我想向所有三个提交添加一个文件(可能与 hello.world 的文件名相同。已删除附加),它包含一条消息,说明 hello.world 已从历史记录中删除作为 repo 清理的一部分,理想情况下在给定的提交中声明 hello.world 的校验和。
有可能吗?我该怎么做?
【问题讨论】:
-
还有什么问题?
-
编辑了问题。 :)
-
你可以用htmlpreview.github.io/?https://github.com/newren/… 来做,但是这种事情完全违背了 Git 的本质。提交是不可变的。
-
你试过用谷歌搜索你的问题
How to change the files in particualr git commits back in history?吗?我的第一个谷歌点击是atlassian.com/git/tutorials/rewriting-history。