From 84e102bf3d6cb4306191a0213bd56cceab6a8b68 Mon Sep 17 00:00:00 2001 From: Doug Parker Date: Wed, 13 Nov 2019 11:56:40 -0800 Subject: [PATCH] docs(@angular/cli): add cherry-pick instructions. This includes instructions on how to cherry-pick commits into the patch branch. Since `cherry-pick` isn't that commonly used, it's useful to write this down for developers who might not be that familiar with it. It also includes fetching the commit beforehand, so users don't get "bad object" errors which can be annoying to work around. The `-x` option is used as well to include a reference to the commit the cherry-pick came from. --- docs/process/release.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/process/release.md b/docs/process/release.md index da502f7dd0..23f508336b 100644 --- a/docs/process/release.md +++ b/docs/process/release.md @@ -39,6 +39,29 @@ Say the following PR is merged; Only the first 2 commits should be cherry picked to the patch branch, as the last 3 are related to a new feature. +Cherry picking is done by checking out the patch branch and cherry picking the new commit onto it. +The patch branch is simply named as a version number, with a X in the relevant spot, such as `9.0.x`. +This should be done after merging to master. + +```shell +# Make sure commit to upstream/master is present in local repo. +git fetch upstream master + +# Check out patch branch from upstream. +git fetch upstream +git checkout + +# Cherry pick the commit. Use the hash from the commit which was merged +# into upstream/master, which should be known to your local repo. +git cherry-pick -x + +# Resolve merge conflicts if necessary... +# Or abort and ask author to submit a separate commit targeting patch-only. + +# Push changes. +git push upstream +``` + # Release ## Before releasing