Hi Sven, You are absolutely right about the positive parts of a "change" in gerrit.
However, I want to point out that in fact, `git commit --amend` (sorry I mis-spelled the command in my previous emails) does not really amend a commit, it creates a new commit and "amends" the pointer(HEAD) pointing to the old commit to point to the newly created commit.
** Reality
When asked, 9 out of 10 engineers in my team prefer to use Github than Gerrit because the `git commit --amend` is so non-trivial and anti-pattern.
Also analytical data (
1,
2) shows that there are averagely 3 to 4 commits per pull request throughout the Github, this implies save/commit actions are 3 times of send-to-review actions. Such reality drives me to think about letting users keep on using traditional `git commit` and add an additional command for the action send-to-review in Gerrit.
** Compare `amend` and `branch-then-squash`
Consider a process of sequentially making 3 edits and using `git commit --amend` 3 times, this process will generate 3 commits:
Assume the base commit is B, commit message is M, and T1..T5 is the tree as a result of each edit.
(I)
HEAD
|
C1(M, T1, B) C2(M, T2, B) C3(M, T3, B)
/ / /
+-------------+-------------+
|
B
Compare to the branch approach, we use normal `git commit`:
(II)
HEAD
|
C1(M, T1, B) -- C2(M, T2, C1) -- C3(M, T3, C2)
/
B
We can see at the end of both processes, the Tree objects are identical. Hence if we squash the branch in the second process at the last step, we have a commit C3'(M, T3, B):
squash(C1..C3, B) => C3'(M, T3, B)
it can be seen that this C3' is actually identical to C3 in the first process. It can also be seen that in process I the history C1 and C2 are discarded.
** The tool
My tool, in compare to many other approaches(repo, gpush, review), the essential difference is my tool letting users do `git commit` in their daily development cycles while adding two commands for "start a new feature" and "send to review" as these two actions are far lesser frequent.
Gerrit is a great tool, I want to make it easier to use.