【发布时间】:2013-10-01 16:50:33
【问题描述】:
好吧:
在 svn 和 bzr 中,我可以分支、提交、合并,我的提交历史将如下所示:
41: Theodore R. Smith 2013-09-14 Jump to list by name instead of number.
40: Theodore R. Smith 2013-09-14 [merge] [m] Miscellaneous cleanups.
39.1.4: Theodore R. Smith 2013-09-14 [m] Removed old files.
39.1.3: Theodore R. Smith 2013-09-14 [m] Fixed bug where test could not...
39.1.2: Theodore R. Smith 2013-09-14 [m] Fixed a CSS layout bug from th...
39.1.1: Theodore R. Smith 2013-09-14 [m] Fixed a typo.
39: Theodore R. Smith 2013-09-14 Added a progress bar.
38: Theodore R. Smith 2013-09-14 [merge] Updated the core libraries.
37.1.3: Theodore R. Smith 2013-09-14 Updated HTML Kickstarter.
37.1.2: Theodore R. Smith 2013-09-14 Upgraded to from jQuery 1.8.3 to 2.0.3.
37.1.1: Theodore R. Smith 2013-09-14 Upgraded to jQuery Address v1.6.
如果我不想扩展历史,我可以:
41: Theodore R. Smith 2013-09-14 Jump to list by name instead of number.
40: Theodore R. Smith 2013-09-14 [merge] [m] Miscellaneous cleanups.
39: Theodore R. Smith 2013-09-14 Added a progress bar.
38: Theodore R. Smith 2013-09-14 [merge] Updated the core libraries.
在任何时候,我都可以通过bzr diff -r37.1.2..37.1.3 轻松非常获得单个合并提交的差异等。
重要的是我的分支历史保留,并且我的主线提交历史没有被次要功能提交污染。
现在,每当我在 git 中进行功能合并时,无论有没有 --no-ff,我都会在我的提交历史记录中得到以下信息:
<hash>: Theodore R. Smith 2013-09-14 Jump to list by name instead of number.
<hash>: Theodore R. Smith 2013-09-14 [merge] [m] Miscellaneous cleanups.
<hash>: Theodore R. Smith 2013-09-14 [m] Removed old files.
<hash>: Theodore R. Smith 2013-09-14 Added a progress bar.
<hash>: Theodore R. Smith 2013-09-14 [m] Fixed bug where test could not...
<hash>: Theodore R. Smith 2013-09-14 [merge] Updated the core libraries.
<hash>: Theodore R. Smith 2013-09-14 [m] Fixed a CSS layout bug from th...
<hash>: Theodore R. Smith 2013-09-14 Updated HTML Kickstarter.
<hash>: Theodore R. Smith 2013-09-14 [m] Fixed a typo.
<hash>: Theodore R. Smith 2013-09-14 Upgraded to from jQuery 1.8.3 to 2.0.3.
<hash>: Theodore R. Smith 2013-09-14 Upgraded to jQuery Address v1.6.
我的问题很多。
- 功能次要提交在主线历史记录中全部。什么鬼?
- 功能次要提交在主线历史记录中混乱。似乎他们是根据他们原来的提交时间而不是合并时间卡在那里的;o
- 修订 ID 没有即时的数字排名,只有随机散列。但我敢打赌,这无法解决。
- 基于此,我不知道功能分支在哪里结束或开始。
我想要一个解决方案
- 保留所有提交历史记录,并让我区分次要功能提交。这是代码取证所需要的。所以
git rebase和git merge --squash一样不存在。 - 不会污染主线提交日志。这可能是最严重的。
- 根据合并时间保持所有提交的正确顺序。拜托,我不能有混合匹配的小提交。
- 最好让我至少以正确的顺序查看所有次要功能提交以及主线历史记录,例如 bzr 是如何做事的,但我不介意只能通过钻头查看此信息-指挥,如
git log。
感谢您帮助我理解这个过于复杂的程序!
【问题讨论】:
标签: git version-control git-merge bazaar