Replace slave with agent
[alexxy/gromacs.git] / docs / dev-manual / change-management.rst
1 .. _gmx-gerrit:
2
3 =========================
4 GROMACS change management
5 =========================
6
7 This documentation assumes the reader is already familiary with using ``git``
8 for managing file revisions.
9
10 .. contents::
11    :local:
12
13 Getting started
14 ===============
15
16 #.  Go to https://gerrit.gromacs.org
17 #.  Click Register (you can choose any OpenID provider including any
18     existing Google/Yahoo account. If you manually enter the URL make sure
19     to start with ``http(s)://``)
20 #.  Choose a username and add an ssh key
21
22 See `here <https://gerrit.gromacs.org/Documentation/intro-quick.html>`_ for
23 a quick intro into Gerrit.
24
25 Creating the SSH key for Gerrit
26 -------------------------------
27
28 In order to push your commits to gerrit server, you must have an SSH key
29 in your computer which matches with the one registered in your Gerrit
30 user account. To do so, you first need to create this unique SSH
31 key. You will be asked to enter a passphrase. *This is
32 optional with respect to Gerrit, but it is a good security practice to have
33 it.*
34
35 To proceed with the creation of the SSH key, type the following commands
36 from your terminal window:
37
38 ::
39
40     $ cd ~/.ssh
41
42     $ ssh-keygen -t rsa -C "your.email@address.com"
43
44 Please substitute the email string in the command above
45 with the same email address which you used to register the account in
46 Gerrit.
47
48 Now you have created your public SSH key, which you need to copy/paste
49 into your Gerrit profile. First, open it with the following command:
50
51 ::
52
53     $ cat id_rsa.pub
54
55 Copy all the contents of the file id_rsa.pub in your clipboard, and
56 switch to your favorite web browser where you logged in to Gerrit
57 GROMACS page. Click on your username at the top right corner of the
58 Gerrit webpage and select "Settings". You should now be in your Gerrit
59 profile settings page, where you should see a vertical menu.
60
61 From this vertical menu, select "SSH Public Keys", then click the button
62 "Add Key ..." and an edit box will appear below the button. Here you
63 need to paste the contents of id_rsa.pub file, which you previously
64 copied to your clipboard.
65
66 Now you are ready to operate!
67
68 Setting up a local repository to work with gerrit
69 -------------------------------------------------
70
71 Either clone using::
72
73     $ git clone ssh://USER@gerrit.gromacs.org/gromacs.git
74
75 (replace **USER** \ with your username)
76
77 or change the remote url using:
78
79 ::
80
81     $ git remote set-url origin ssh://USER@gerrit.gromacs.org/gromacs.git
82
83 (change **USER** with the username you've registered)
84
85 Or add a new remote url using:
86
87 ::
88
89     $ git remote add upload ssh://USER@gerrit.gromacs.org/gromacs.git
90
91 If you are working with a GROMACS repository other than the source code,
92 then you should substitute e.g. regressiontests.git or releng.git
93 instead of gromacs.git above.
94
95 Be sure to configure your user name and e-mail to match those registered to Gerrit::
96
97        git config [--global] user.name "Your Name"
98        git config [--global] user.email "your.name@domain.org"
99
100 It is optional if you want to set those settings for git on a global
101 level, or just for the current repository.
102
103 If necessary, register the e-mail address you want to use
104 with Gerrit.
105
106 Install the commit hook
107 -----------------------
108
109 Differently from a simple usage of git, with Gerrit a Change-ID is
110 needed at the end of each commit message. Gerrit uses Change-IDs to
111 understand whether your new commit is patching a previous commit or it
112 should be regarded as a separate, different patch, uncorrelated with
113 your previously pushed commits.
114
115 To allow git to append such Change-IDs automatically after each commit,
116 type the following command:
117
118 ::
119
120     $ scp -p USER@gerrit.gromacs.org:hooks/commit-msg .git/hooks/
121
122 (change **USER** with the username you've registered in Gerrit)
123
124 .. Note::
125
126    This commit hook needs to be added to the repo where the
127    commit will occur, not the repo where the push to upstream will occur
128    (should they be different).
129
130 Uploading a commit for review
131 -----------------------------
132
133 Make sure your HEAD is up to date (use ``git pull --rebase origin`` if
134 someone else has committed since you last pulled), check that your commit
135 message follows the :doc:`commitstyle`, make your commit and then use
136
137 ::
138
139     $ git push origin HEAD:refs/for/BRANCH
140
141 Replace ``BRANCH`` with the branch it should be committed to.
142 Master has a number of sub branches that can be used to show
143 what the patch is relevant to such as OpenCL and tools-cleanup.
144 These can be pushed to by specifying them after the branch,
145 for example ``BRANCH/domdec-cleanup``.
146
147 When updating/replacing an existing change, make sure the commit message
148 has the same Change-ID. Please see the section `Ammending a change <gmx-ammend-change>`
149 below.
150
151 Uploading a draft commit for review
152 -----------------------------------
153
154 Uploading a draft lets you share a change which isn't ready yet for
155 review for merging. It is only visible to those people you invite as
156 reviewers, which you need to add explicitly. You upload a change as a
157 draft by uploading it to refs/drafts/branch instead of refs/for/branch.
158 Typically you want to push to refs/drafts/master.
159
160 Jenkins is not automatically triggered for drafts, but if you add
161 "Jenkins Buildbot" as a reviewer, it learns that you might be interested
162 in having it try out your code. Then, you can go to Jenkins and log in
163 with your OpenID. Then go to
164 http://jenkins.gromacs.org/gerrit_manual_trigger/ and tell it to
165 search for the commit for which you want to trigger the build agents.
166 For example, https://gerrit.gromacs.org/#/c/1238/ is 1238 (but maybe
167 SHA or ChangeID will work, too).
168
169 After uploading a commit
170 ------------------------
171
172 Use
173
174 ::
175
176     $ git reset --keep HEAD^
177
178 to reset your branch to the HEAD before the commit you just uploaded.
179 This allows you to keep your repo in sync with what every other repo
180 thinks is the HEAD. In particular, if you have another patch to upload
181 (or worse, have to pull in other people's patches, and then have a new
182 patch), you probably do not want to have the second patch depend on the
183 first one. If the first one is rejected, you have made extra work for
184 yourself sorting out the mess. Your repo still knows about the commit,
185 and you can cherry-pick it to somewhere if you want to use it.
186
187 Code Review
188 ===========
189
190 Reviewing someone else's uploaded commit
191 ----------------------------------------
192
193 The reviewing workflow is the following:
194
195 #. https://gerrit.gromacs.org/#q/status:open shows all open changes
196 #. A change needs a +2 and usually +1 review, as well as a +2 verified
197    to be allowed to be merged.
198 #. Usually a patch goes through several cycles of voting, commenting and
199    updating before it becomes merged, with votes from the developers indicating
200    if they think that change hat progressed enough to be included.
201 #. A change is submitted for merging and post-submit testing
202    by clicking "Submit" by one of the main developers. This should be done by
203    the reviewer after voting +2. After a patch is submitted it is
204    replicated to the main git server.
205
206 Do not review your own code. The point of the policy is that at least
207 two non-authors have voted +1, and that the issues are resolved in the
208 opinion of the person who applies a +2 before a merge. If you have
209 uploaded a minor fix to someone else's patch, use your judgement in
210 whether to vote on the patch +1.
211
212 Guide for reviewing
213 -------------------
214
215 -  First and foremost, check correctness to the extent possible;
216 -  As portability and performance are the most important things (after
217    correctness) do check for potential issues;
218 -  Check adherence to the :ref:`GROMACS coding
219    standards <style-guidelines>`;
220 -  We should try to ensure that commits that implement bugfixes (as
221    well as important features and tasks) get a `Redmine`_ entry created
222    and linked. The linking is done **automatically** by
223    `Redmine`_ **if the commit message contains** keyword
224    "#issueID", the valid syntax is explained below.
225 -  If the commit is a **bugfix**\ :
226
227    -  if present in Redmine it has to contain a valid reference to the
228       issue;
229    -  if it's a **major bug**, there has to be a bug report filed in
230       `Redmine`_  (with urgent or
231       immediate priority) and referenced appropriately.
232
233 -  If the commit is a **feature/task** implementation:
234
235    -  if it's present in `Redmine`_ it
236       has to contain a valid reference to the issue;
237    -  If no current issue is currently present and the change
238       would benefit of one for future explanation on why it was
239       added, a new redmine issue should be created.
240
241 Use of Verify
242 -------------
243
244 Jenkins has been installed for automated build testing. So it isn't
245 required to vote "verify +2" anymore. As the testing is not always
246 perfect, and because test coverage can be spotty, developers can still
247 manually vote to indicate that a change performs as intended. Please note
248 that this should not be abused to bypass Jenkins testing. The vote from
249 the test suite should only be discarded if failures are caused by unrelated
250 issues.
251
252 Further information
253 -------------------
254
255 Currently it is possible to review your own code. It is undesirable to
256 review your own code, because that defeats the point. It will be
257 deactivated if it is being abused and those responsible may lose
258 their voting rights.
259
260 For further documentation:
261
262 -  `|Gromacs| specific manual <https://gerrit.gromacs.org/Documentation/index.html>`__
263 -  `General tutorials <https://gerrit-documentation.storage.googleapis.com/Documentation/2.15.3/index.html#_tutorials>`__
264
265 FAQs
266 ====
267
268 How do I access gerrit behind a proxy?
269 --------------------------------------
270
271 If you are behind a firewall blocking port 22, you can use socat to
272 overcome this problem by adding the following block to your
273 ``~/.ssh/config``
274
275 ::
276
277     Host gerrit.gromacs.org
278            User USER
279            Hostname gerrit.gromacs.org
280            ProxyCommand socat - PROXY:YOURPROXY:gerrit.gromacs.org,proxyport=PORT
281
282 Replace ``YOURPROXY``, ``PORT`` and ``USER``, (but not ``PROXY``!) with your own
283 settings.
284
285 How do I link fixes with Redmine issues?
286 ----------------------------------------
287
288 The linking of commits that relate to an existing issue is
289 done automatically by `Redmine`_ if
290 the git commit message contains a reference to the Redmine entry
291 through the issueID, the numeric ID of the respective issue (bug,
292 feature, task). The general syntax of a git comit reference is [keyword]
293 #issueID.
294
295 The following two types of refereces are possible:
296
297 -  For bugfix commits the issueID should be preceeded by
298    the "Fixes" keyword;
299 -  For commits related to a general issue (e.g. partial implementation of
300    feature or partial fix), the issueID should be preceeded by the "Refs" keyword;
301
302 An example commit message header::
303
304     This commit refs #1, #2 and fixes #3
305
306 How can I submit conflicting changes?
307 -------------------------------------
308
309 When there are several, mutually conflicting changes in gerrit pending
310 for review, the submission of the 2nd and subsequent ones will fail.
311 Those need to be resolved locally and updated by
312
313 ::
314
315     $ git pull --rebase
316
317 Then fix the conflicts and use
318
319 ::
320
321     $ git push
322
323 Please add a comment (review without voting) saying that it was rebased
324 with/without conflicts, to help the reviewer.
325
326
327 .. _gmx-ammend-change:
328
329 How do I upload an update to a pending change?
330 ----------------------------------------------
331
332 First, obtain the code you want to update. If you haven't changed your
333 local repository, then you already have it. Maybe you can check out the
334 branch again, or consult your git reflog. Otherwise, you should go to
335 gerrit, select the latest patch set (remembering that others may have
336 contributed to your work), and use the "Download" link to give you a
337 "Checkout" command that you can run, e.g.
338
339 ::
340
341     $ git fetch ssh://USER@gerrit.gromacs.org/gromacs refs/changes/?/?/? && git checkout FETCH_HEAD
342
343 Make your changes, then add them to the index, and use
344
345 ::
346
347     $ git commit --amend
348     $ git push origin HEAD:refs/for/BRANCH
349
350 When amending the previous commit message, leave the "Change-Id" intact
351 so that gerrit can recognize this is an update and not open a new issue.
352
353 DO NOT rebase your patch set and update it in one step. If both are done
354 in one step, the diff between patch set versions has both kinds of
355 changes. This makes it difficult for the reviewer, because it is not
356 clear what parts have to be re-reviewed. If you need to update and
357 rebase your change please do it in two steps (order doesn't matter).
358 gerrit has a feature that allows you to rebase within gerrit, which
359 creates the desired independent patch for that rebase (if the rebase is
360 clean).
361
362 How do I get a copy of my commit for which someone else has uploaded a patch?
363 -----------------------------------------------------------------------------
364
365 Gerrit makes this easy. You can download the updated commit in various
366 ways, and even copy a magic git command to your clipboard to use in your
367 shell.
368
369 You can select the kind of git operation you want to do (cherry-pick is
370 best if you are currently in the commit that was the parent, checkout is
371 best if you just want to get the commit and not worry about the current
372 state of your checked out git branch) and how you want to get it. The
373 icon on the far right will paste the magic shell command into your
374 clipboard, for you to paste into a terminal to use.
375
376 How do I submit lots of independent commits (e.g. bug fixes)?
377 -------------------------------------------------------------
378
379 Simply pushing a whole commit tree of unrelated fixes creates
380 dependencies between them that make for trouble when one of them needs
381 to be changed. Instead, from an up-to-date repo, create and commit the
382 first change (or git cherry-pick it from an existing other branch).
383 Upload it to gerrit. Then do
384
385 ::
386
387     $ git reset --keep HEAD^
388
389 This will revert to the old HEAD, and allow you to work on a new commit
390 that will be independent of the one you've already uploaded. The one
391 you've uploaded won't appear in the commit history until it's been
392 reviewed and accepted on gerrit and you've pulled from the main repo,
393 however the version of it you uploaded still exists in your repo. You
394 can see it with git show or git checkout using its hash - which you can
395 get from the gerrit server or by digging in the internals of your repo.
396
397 How can I avoid needing to remember all these arcane git commands?
398 ------------------------------------------------------------------
399
400 In your ``.gitconfig``, having set the git remote for the gerrit repo to
401 upload, use something like the following to make life easier:
402
403 ::
404
405     [alias]
406             upload-r2018  = push origin HEAD:refs/for/release-2018
407             upload-r2016  = push origin HEAD:refs/for/release-2016
408             upload-master = push origin HEAD:refs/for/master
409             upload-reset  = reset --keep HEAD^
410
411
412 How can I get my patch in gerrit to have a different parent?
413 ------------------------------------------------------------
414
415 Sometimes, some other patch under review is a relevant point from which
416 to start work. For simple changes without conflicts to the previous
417 work, you can use the Gerrit web UI to either rebase or cherry-pick
418 the change you are working on.
419
420 If this is not possible, you can still use
421 the canned gerrit checkouts to (say) checkout out patch 2117 and start work:
422
423 ::
424
425     git fetch https://gerrit.gromacs.org/gromacs refs/changes/17/2117/2 && git checkout FETCH_HEAD
426
427 Other times you might have already uploaded a patch (e.g. patch 1 of
428 2145), but now see that some concurrent work makes more sense as a
429 parent commit (e.g. patch 2 of 2117), so check it out as above, and then
430 use the canned gerrit **cherry-pick**:
431
432 ::
433
434     git fetch https://gerrit.gromacs.org/gromacs refs/changes/45/2145/1 && git cherry-pick FETCH_HEAD
435
436 Resolve any merge commits, check things look OK, and then upload.
437 Because the ChangeId of 2145 hasn't changed, and nothing about 2117 has
438 changed, the second patch set of 2145 will reflect the state of 2145 now
439 having 2117 as a parent.
440
441 This can also be useful for constructing a short development branch
442 where the commits are somehow dependent, but should be separated for
443 review purposes. This technique is useful when constructing a series of
444 commits that will contribute to a release.
445
446 How can I revert a change back to an old patchset?
447 --------------------------------------------------
448
449 If a change accidentally gets updated or when a patchset is incorrect,
450 you might want to revert to an older patchset. This can be done by
451 fetching an old patchset, running git commit --amend to update the time
452 stamp in the commit and pushing the commit back up to gerrit. Note that
453 without the amending you will get an error from the remote telling you
454 that there are no new changes.
455
456 How do I handle common errors
457 -----------------------------
458
459 .. rubric:: error: server certificate verification failed. CAfile...
460
461 If you try to cherry-pick a change from the server, you'll probably get
462 the error:
463
464 ::
465
466     $ git fetch https://gerrit.gromacs.org/p/gromacs refs/changes/09/109/1 && git cherry-pick FETCH_HEAD
467     error: server certificate verification failed.
468     CAfile: /etc/ssl/certs/ca-certificates.crt
469     CRLfile: none while accessing https://gerrit.gromacs.org/p/gromacs/info/refs
470
471     fatal: HTTP request failed
472
473 As explained
474 `here <http://code.google.com/p/chromium-os/issues/detail?id=13402>`__,
475 the problem is with git not trusting the certificate and as a workaround
476 one can set globally
477
478 ::
479
480     $ git config --global --add http.sslVerify false
481
482 or prepend GIT_SSL_NO_VERIFY=1 to the command
483
484 ::
485
486     $ GIT_SSL_NO_VERIFY=1  git fetch https://gerrit.gromacs.org/p/gromacs refs/changes/09/109/1 \
487      && git cherry-pick FETCH_HEAD
488
489 .. rubric:: Various error messages and their meanings
490
491 http://review.coreboot.org/Documentation/error-messages.html
492
493 More git tips
494 =============
495
496 .. rubric:: Q: Are there some other useful git configuration settings?
497
498 A: If you need to work with
499 branches that have large
500 differences (in particular, if a
501 lot of files have moved), it can
502 be helpful to set
503
504 ::
505
506     git config diff.renamelimit 5000
507
508 to increase the limit of inexact
509 renames that Git considers. The
510 default value is not sufficient,
511 for example, if you need to do a
512 merge or a cherry-pick from
513 a release branch to master.
514
515 .. rubric:: Q: How do I use git rebase (also ``git pull --rebase``)?
516
517 A: Assume you have a local
518 feature branch checked out, that
519 it is based on master, and master
520 has gotten new commits. You can
521 then do
522
523 ::
524
525     git rebase master
526
527 to move your commits on top of
528 the newest commit in master. This
529 will save each commit you did,
530 and replay them on top of master.
531 If any commit results in
532 conflicts, you need to resolve
533 them as usual (including marking
534 them as resolved using git add),
535 and then use
536
537 ::
538
539     git rebase --continue
540
541 Note that unless you are sure
542 about what you are doing, you
543 should not use any commands that
544 create or delete commits (git
545 commit, or git checkout or git
546 reset without paths). ``git rebase
547 --continue`` will create the commit
548 after conflicts have been
549 resolved, with the original
550 commit message (you will get a
551 chance to edit it).
552
553 If you realize that the conflicts
554 are too messy to resolve (or that
555 you made a mistake that resulted
556 in messy conflicts), you can use
557
558 ::
559
560     git rebase --abort
561
562 to get back into the state you
563 started from (before the
564 original git rebase master
565 invocation). If the rebase is
566 already finished, and you realize
567 you made a mistake, you can get
568 back where you started with
569 (use git
570 log <my-branch>@{1} and/or git
571 reflog <my-branch> to check that
572 this is where you want to go)
573
574 ::
575
576     git reset --hard <my-branch>@{1}
577
578 .. rubric:: Q: How do I prepare several commits at once?
579
580 A: Assume I have multiple independent changes in my working tree.
581 Use
582
583 ::
584
585     git add [-p] [file]
586
587 to add one independent change at
588 a time to the index. Use
589
590 ::
591
592     git diff --cached
593
594 to check that the index contains
595 the changes you want. You can
596 then commit this one change:
597
598 ::
599
600     git commit
601
602  If you want to test that the
603 change works, use to temporarily
604 store away other changes, and do
605 your testing.
606
607 ::
608
609     git stash
610
611 If the testing fails, you can
612 amend your existing commit with
613 ``git commit --amend``. After you are
614 satisfied, you can push the
615 commit into gerrit for review. If
616 you stashed away your changes and
617 you want the next change to be
618 reviewed independently, do
619
620 ::
621
622     git reset --hard HEAD^
623     git stash pop
624
625 (only do this if you pushed the
626 previous change to gerrit,
627 otherwise it is difficult to get
628 the old changes back!) and repeat
629 until each independent change is
630 in its own commit. If you skip
631 the ``git reset --hard`` step, you
632 can also prepare a local feature
633 branch from your changes.
634
635 .. rubric:: Q: How do I edit an earlier commit?
636
637 A: If you want to edit the latest
638 commit, you can simply do the
639 changes and use
640
641 ::
642
643     git commit --amend
644
645 If you want to edit some other
646 commit, and commits after that
647 have not changed the same lines,
648 you can do the changes as usual
649 and use
650
651 ::
652
653     git commit --fixup <commit>
654
655 or
656
657 ::
658
659     git commit --squash <commit>
660
661 where <commit> is the commit you
662 want to change (the difference is
663 that ``--fixup`` keeps the original
664 commit message, while ``--squash``
665 allows you to input additional
666 notes and then edit the original
667 commit message during ``git rebase
668 -i``). You can do multiple commits
669 in this way. You can also mix
670 ``--fixup/--squash`` commits with
671 normal commits. When you are
672 done, use
673
674 ::
675
676     git rebase -i --autosquash <base-branch>
677
678 to merge the ``--fixup/--squash``
679 commits to the commits they
680 amend. See separate question on
681 ``git rebase -i`` on how to choose
682 <base-branch>.
683
684 In this kind of workflow, you
685 should try to avoid to change the
686 same lines in multiple commits
687 (except in ``--fixup/--squash``
688 commits), but if you have already
689 changed some lines and want to
690 edit an earlier commit, you can
691 use
692
693 ::
694
695     git rebase -i <base-branch>
696
697 but you likely need to resolve
698 some conflicts later. See ``git
699 rebase -i`` question later.
700
701 .. rubric:: Q: How do I split a commit?
702
703 A: The instructions below apply
704 to splitting the HEAD commit; see
705 above how to use ``git rebase -i`` to
706 get an earlier commit as HEAD to
707 split it.
708
709 The simplest case is if you want
710 to split a commit A into a chain
711 A'-B-C, where A' is the first new
712 commit, and contains most of the
713 original commit, including the
714 commit message. Then you can do
715
716 ::
717
718     git reset -p HEAD^ [-- <paths>]
719     git commit --amend
720
721 to selectively remove parts from
722 commit A, but leave them in your
723 working tree. Then you can create
724 one or more commits of the
725 remaining changes as described in
726 other tips.
727
728 If you want to split a commit A
729 into a chain where the original
730 commit message is reused for
731 something else than the first
732 commit (e.g., B-A'-C), then you
733 can do
734
735 ::
736
737     git reset HEAD^
738
739 to remove the HEAD commit, but
740 leave everything in your working
741 tree. Then you can create your
742 commits as described in other
743 tips. When you come to a point
744 where you want to reuse the
745 original commit message, you can
746 use
747
748 ::
749
750     git reflog
751
752 to find how to refer to your
753 original commit as ``HEAD@{n}``, and
754 then do
755
756 ::
757
758     git commit -c HEAD@{n}
759
760 .. rubric:: Q: How do I use git rebase -i to only edit local commits?
761
762 A: Assume that you have a local
763 feature branch checked out, this
764 branch has three commits, and
765 that it is based on master.
766 Further, assume that master has
767 gotten a few more commits after
768 you branched off. If you want to
769 use ``git rebase -i`` to edit your
770 feature branch (see above), you
771 probably want to do
772
773 ::
774
775     git rebase -i HEAD~3
776
777 followed by a separate
778
779 ::
780
781     git rebase master
782
783 The first command allows you to
784 edit your local branch without
785 getting conflicts from changes in
786 master. The latter allows you to
787 resolve those conflicts in a
788 separate rebase run. If you feel
789 brave enough, you can also do
790 both at the same time using
791
792 ::
793
794     git rebase -i master
795
796 .. rubric:: Interacting with Gerrit
797    :name: interacting-with-gerrit
798    :class: editable
799
800 This section is intended for
801 using git to interact with
802 gerrit; interacting with the web
803 UI may be better dealt with on a
804 separate page.
805
806 .. rubric:: Q: How do I move a change from a branch to another?
807
808 A: Moving one or a few changes is
809 most easily done using ``git
810 cherry-pick``. To move a single
811 change, first do
812
813 ::
814
815     git checkout <target-branch>
816
817 Then, open the change/patch set
818 in Gerrit that you want to move,
819 select "cherry-pick" in the
820 Download section for that patch
821 set, and copy/paste the given
822 command:
823
824 ::
825
826     git fetch ... refs/changes/... && git cherry-pick FETCH_HEAD
827
828 Resolve any conflicts and do
829
830 ::
831
832     git commit [-a]
833
834 You can also cherry-pick multiple
835 changes this way to move a small
836 topic branch. Before pushing the
837 change to Gerrit, remove the
838 lines about conflicts from the
839 commit message, as they don't
840 serve any useful purpose in the
841 history. You can type that
842 information into the change as a
843 Gerrit comment if it helps the
844 review process. Note that Gerrit
845 creates a new change for the
846 target branch, even if Change-Ids
847 are same in the commits. You need
848 to manually abandon the change in
849 the wrong branch.
850