好的,所以:
在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.
我的疑问有以下几点:
- 所有的功能性小提交都在主线历史记录中,这是怎么回事?
- 功能性小提交在主线历史记录中混乱无序。它们好像被固定在原始提交时间上,而不是合并时间。
- 修订ID没有立即的数字排名,只有随机哈希值。但我敢打赌这是无法修复的。
- 如果只看这个,我无法确定一个功能分支何时开始或结束。
- 保留所有提交历史,并让我查看小的功能性提交差异。这对于代码取证很重要。所以,git rebase和git merge --squash都不能用。
- 不污染主线提交日志。这可能是最严重的问题。
- 根据合并时间保持所有提交的正确顺序。请不要让小的提交混杂在一起。
- 最好能够让我查看所有小的功能性提交,并按正确的顺序与主线历史记录一起查看,就像bzr那样。虽然我不介意只能使用类似git log这样的命令来查看此信息。