linear commit history. Merge commits are generally avoided, and developers
generally run git rebase frequently before submitting changes to gerrit.
+An optional set of wrapper scripts called [[GitGerrit]] are available to search
+gerrit from command line, fetch commits by the legacy gerrit number, and to
+assist in cherry picking commits to stable branches.
Master branch inclusion
-----------------------
git fetch origin
git checkout origin/openafs-stable-1_8_x
git cherry-pick -e -x origin/master~<number>
+ <remove old Change-Id in the editor>
+ git commit --amend
+ git show
+ <verify a new Change-Id has been added.>
-Alternatively, you can run `git commit --amend` immediately after each
-cherry-pick to remove rhe Change-ID.
+Run `git commit --amend` immediately after each cherry-pick to verify the
+cherry-pick command has a new Change-ID.
+
+Alternately, the [[GitGerrit]] git-gerrit-cherry-pick tool can be used to
+cherry pick by gerrit number and will automatically update the Change-Id
+in the commit message:
+
+Example:
+
+ git fetch origin
+ git checkout origin/openafs-stable-1_8_x
+ git gerrit-cherry-pick <gerrit-number>
In the event the cherry-pick fails, due to code skew between the branches,
it may be necessary to manually fix the merge conflict and run `git cherry-pick --continue`
git checkout origin/openafs-stable-1_6_x
git cherry-pick -e -x origin/openafs-stable-1_8_x~<number>
+Example with [[GitGerrit]]:
+
+ git fetch origin
+ git checkout origin/openafs-stable-1_6_x
+ git gerrit-cherry-pick <gerrit-number> --branch origin/openafs-stable-1_8_x
+
In the event the cherry-pick fails, due to code skew between the branches,
it may be necessary to manually fix the merge conflict and run `git check-pick --continue`
to complete the cherry pick. In this case, the `(cherry picked from commit...)`