Reputation: 23231
OK so:
In svn and bzr, I can branch, commit, merge, and my commit history will look like this:
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.
If I don't want to expand out the history, I can:
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.
At any time, I can get diffs, etc. for the individual merged commits quite easy, via bzr diff -r37.1.2..37.1.3
, for instance.
What's important is that my branch history is preserved and my mainline commit history is NOT polluted by the minor feature commits.
Now, whenever I do feature merges in git, however, with or without --no-ff
, I get the following in my commit history:
<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.
My problems with this are many fold.
I want a solution that
git rebase
is out of the picture, as is git merge --squash
.git log
.Thank you for helping me understand this overly-complicated program!
Upvotes: 3
Views: 2225
Reputation: 9488
The graph of Git and Bazaar are exactly the same, I know because I wrote Git's official Bazaar bridge, the only difference is how the graph is presented through the log
command.
git log
has tons of options so can specify exactly how you want that graph to be presented.
It looks like what you want is this:
git log --oneline --graph
Which will show you the merges in a similar way as bzr log
does:
* 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'
You can also ignore the "minor commits" completely
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'
If you get tired of typing all these options, you can configure an alias:
git config --global alias.l 'log --oneline --graph'
So you can just type git l
.
Upvotes: 11