From 840efbcaa4b8a3f0bd99f59d1eb822fecdd4bd74 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Wed, 13 Jan 2021 11:19:35 -0500 Subject: git-codereview: document sync-branch Change-Id: If5f9018bc1a87444df44c4d8ae853908ee283154 Reviewed-on: https://go-review.googlesource.com/c/review/+/283613 Trust: Russ Cox Run-TryBot: Russ Cox TryBot-Result: Go Bot Reviewed-by: Filippo Valsorda --- git-codereview/doc.go | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'git-codereview') diff --git a/git-codereview/doc.go b/git-codereview/doc.go index 62c42ea..2b1af88 100644 --- a/git-codereview/doc.go +++ b/git-codereview/doc.go @@ -353,6 +353,38 @@ The sync command updates the local repository. It fetches commits from the remote repository and merges them from the upstream branch to the current branch, rebasing any pending changes. +Sync-branch + +The sync-branch command merges changes from the parent branch into +the current branch. + + git codereview sync-branch + +There must be no pending work in the current checkout. Sync-branch pulls +all commits from the parent branch to the current branch and creates a +merge commit. If there are merge conflicts, sync-branch reports those +conflicts and exits. After fixing the conflicts, running + + git codereview sync-branch -continue + +will continue the process. (If the merge should be abandoned, use +the standard “git merge -abort” command instead.) + +The sync-branch command depends on the codereview.cfg having +branch and parent-branch keys. See the Configuration section below. + +When a server-side development branch is being shut down and +the changes should be merged back into the parent branch, the command + + git codereview sync-branch -merge-back-to-parent + +runs the merge in reverse. This is a very rare operation and should not +be used unless you are certain that you want changes to flow in the +reverse direction, because work on the dev branch has been ended. +After running this command, the local checkout of the dev branch will +be configured to mail changes to the parent branch instead of the +dev branch. + Configuration If a file named codereview.cfg is present in the repository root, -- cgit v1.3