From 0dfa64fa8ebb5b99dcf6b5a3f6684441d90a37d7 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Fri, 30 Jan 2015 11:50:36 -0500 Subject: git-codereview: add rebase-work command Shorthand for git rebase -i $(git codereview branchpoint). Suggested alias: rw = codereview rebase-work. Change-Id: I4c489064fc6fced8b18cf528b77ae36b9a1c7f06 Reviewed-on: https://go-review.googlesource.com/3622 Reviewed-by: Rob Pike --- git-codereview/doc.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'git-codereview/doc.go') diff --git a/git-codereview/doc.go b/git-codereview/doc.go index 03eae19..58553a9 100644 --- a/git-codereview/doc.go +++ b/git-codereview/doc.go @@ -32,6 +32,7 @@ aliases in their .gitconfig file: gofmt = codereview gofmt mail = codereview mail pending = codereview pending + rebase-work = codereview rebase-work submit = codereview submit sync = codereview sync @@ -50,7 +51,8 @@ Branchpoint The branchpoint command prints the commit hash of the most recent change on the current branch that is shared with the Gerrit server. This is the point where local work branched from the published tree. The command is intended -mainly for use in scripts. For example, "git rebase -i $(git codereview branchpoint)". +mainly for use in scripts. For example, "git diff $(git codereview branchpoint)" +or "git log $(git codereview branchpoint)..HEAD". Change @@ -156,6 +158,14 @@ The -l flag causes the command to use only locally available information. By default, it fetches recent commits and code review information from the Gerrit server. +Rebase-work + +The rebase-work command runs git rebase in interactive mode over pending changes. +It is shorthand for "git rebase -i $(git codereview branchpoint)". +It differs from plain "git rebase -i" in that the latter will try to incorporate +new commits from the origin branch during the rebase, and git rebase-work +does not. + Submit The submit command pushes the pending change to the Gerrit server and tells -- cgit v1.3