The branch-flipping rebase -i internally does is not 'checkout' as far
as the end-user is concerned; therefore, rebase -i should never write
"checkout: " messages to the reflog.  To achieve this, set a sensible
GIT_REFLOG_ACTION; checkout does not respect this variable yet, but a
future patch will change this.

After that patch, rebase -i will write the following line to the reflog
when started:

  rebase -i (start): checkout master

This is much better than the confusing message it currently writes:

  checkout: moving from master to 1462b67

Signed-off-by: Ramkumar Ramachandra <>
--- | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ b/
index f953d8d..0f04425 100644
--- a/
+++ b/
@@ -838,6 +838,7 @@ comment_for_reflog start
 if test ! -z "$switch_to"
+       GIT_REFLOG_ACTION="$GIT_REFLOG_ACTION: checkout $switch_to"
        output git checkout "$switch_to" -- ||
                die "Could not checkout $switch_to"
@@ -981,6 +982,7 @@ has_action "$todo" ||
 test -d "$rewritten" || test -n "$force_rebase" || skip_unnecessary_picks
+GIT_REFLOG_ACTION="$GIT_REFLOG_ACTION: checkout $onto_name"
 output git checkout $onto || die_abort "could not detach HEAD"
 git update-ref ORIG_HEAD $orig_head

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to