【发布时间】:2015-08-29 23:48:09
【问题描述】:
我已使用“git replace”将分支(没有共同祖先)22b2b25 替换为 master 中的提交。我希望这种改变是永久性的。我对以前的历史不感兴趣。在下面的输出中,前 5 个提交来自原始 master 分支,而后 2 个提交来自不同的分支。
当我将它推送到一个新的存储库时,git-replace 丢失了,旧的历史重新出现了。有没有办法使这种变化永久化?
branch master 在原始 repo 中如下所示。我想在远程仓库和后续克隆中看到这一点。
[mike@localhost canal_site]$ git log --oneline --decorate
cdf0ae3 (HEAD, origin/master, master) MM: sqlencode course name for ad-hoc courses
2b57df5 MM: fixes for changes so far
7916eaf MM: ad hoc - more refactoring
1e00d22 MM: reformatted code
e36cee1 factored out equal ops
22b2b25 (origin/prod20140313, prod20140313) initial load from production 9-June-2015
08379cd initial inclusion of production files from 9-June-2015
【问题讨论】:
-
@Mat 感谢重新格式化和投票。我宁愿认为是代码内容用于非代码让某人感到不安,但 -1 杀死了你的问题。
标签: git