The*_*ith 3 git version-control bazaar git-merge
好的:
在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.
Run Code Online (Sandbox Code Playgroud)
如果我不想扩展历史,我可以:
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.
Run Code Online (Sandbox Code Playgroud)
在任何时候,我可以得到的diff等,为个体合并提交相当容易的,通过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.
Run Code Online (Sandbox Code Playgroud)
我的问题很多.
我想要一个解决方案
git rebase,原样是不合适的git merge --squash.git log.感谢您帮助我理解这个过于复杂的程序!
Fel*_*peC 11
Git和Bazaar的图形完全相同,我知道因为我写了Git的官方Bazaar桥,唯一的区别是图表是如何通过log命令呈现的.
git log 有很多选项,因此可以准确指定您希望如何呈现该图表.
看起来你想要的是这个:
git log --oneline --graph
Run Code Online (Sandbox Code Playgroud)
这将以类似的方式向您显示合并bzr log:
* eaaec50 Merge git://github.com/git-l10n/git-po
|\
| * 1b5f46f l10n: Add reference for french translation team
| * 6b388fc l10n: fr.po: 821/2112 messages translated
* | 2809258 Merge branch 'sb/mailmap-updates'
|\ \
| * | cdb6b5a .mailmap: Combine more (name, email) to individual persons
| * | 10813e0 .mailmap: update long-lost friends with multiple defunct addresses
* | | 8ed205a git-remote-mediawiki: ignore generated git-mw
| |/
|/|
* | 96cb27a Merge branch 'maint'
Run Code Online (Sandbox Code Playgroud)
您也可以完全忽略"次要提交"
git log --oneline --first-parent
eaaec50 Merge git://github.com/git-l10n/git-po
2809258 Merge branch 'sb/mailmap-updates'
8ed205a git-remote-mediawiki: ignore generated git-mw
96cb27a Merge branch 'maint'
Run Code Online (Sandbox Code Playgroud)
如果您厌倦了键入所有这些选项,则可以配置别名:
git config --global alias.l 'log --oneline --graph'
Run Code Online (Sandbox Code Playgroud)
所以你可以输入git l.