Git和Bazaar的图形完全相同,我知道因为我写了Git的官方Bazaar桥,唯一的区别是图形是如何通过
log
命令
git log
有很多选项,所以可以准确地指定图形的显示方式。
看起来你想要的是这样的:
git log --oneline --graph
它将以类似的方式向您显示合并
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'
您也可以完全忽略“次要提交”
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'
如果您厌倦了键入所有这些选项,可以配置一个别名:
git config --global alias.l 'log --oneline --graph'
所以你可以直接打字
git l
.