git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] rebase: mention --abort alongside --continue

From
PWPhillip Wood <phillip.wood123@gmail.com>
Date
Jun 16, 2026, 08:36 UTC
Message-ID
<89d72342-5aa1-4dcf-951b-d0c791f91738@gmail.com>
In-Reply-To
<pull.2330.git.git.1781551170529.gitgitgadget@gmail.com>
Hi Harald
On 15/06/2026 20:19, Harald Nordgren via GitGitGadget wrote:
Show 6 quoted lines
> From: Harald Nordgren <haraldnordgren@gmail.com>
> 
> The warning shown when an "exec" step fails and the "git status"
> advice while splitting or editing a commit pointed users at "git
> rebase --continue" but not "--abort". Mention it in both, matching
> the conflict case.

I'm not sure that the "failed exec" and "conflicts" cases are equivalent though. If you have some nasty conflict that you don't want to resolve then aborting and trying another approach such is incrementally rebasing is the only option. If an exec command fails then it likely means that a test has failed or some something similar which is minor inconvenience which needs fixing before continuing - it seems very unlikely that the user would want to abort the rebase.

Thanks
Phillip
Show 213 quoted lines
> Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>
> ---
>      rebase: mention --abort when an exec step fails
>      
>      Mention git rebase --abort both in the warning shown when an exec step
>      fails and in the git status advice while splitting or editing a commit,
>      since rebase pointed users at --continue there without saying how to
>      bail out, unlike every comparable command.
> 
> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2330%2FHaraldNordgren%2Frebase-exec-abort-hint-v1
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2330/HaraldNordgren/rebase-exec-abort-hint-v1
> Pull-Request: https://github.com/git/git/pull/2330
> 
>   sequencer.c            |  8 ++++++--
>   t/t7512-status-help.sh | 17 +++++++++++++++++
>   wt-status.c            |  7 ++++++-
>   3 files changed, 29 insertions(+), 3 deletions(-)
> 
> diff --git a/sequencer.c b/sequencer.c
> index 57855b0066..c46e5b95bc 100644
> --- a/sequencer.c
> +++ b/sequencer.c
> @@ -3884,7 +3884,9 @@ static int do_exec(struct repository *r, const char *command_line, int quiet)
>   			  "You can fix the problem, and then run\n"
>   			  "\n"
>   			  "  git rebase --continue\n"
> -			  "\n"),
> +			  "\n"
> +			  "To abort and get back to the state before \"git rebase\", run "
> +			  "\"git rebase --abort\".\n"),
>   			command_line,
>   			dirty ? _("and made changes to the index and/or the "
>   				"working tree.\n") : "");
> @@ -3897,7 +3899,9 @@ static int do_exec(struct repository *r, const char *command_line, int quiet)
>   			  "Commit or stash your changes, and then run\n"
>   			  "\n"
>   			  "  git rebase --continue\n"
> -			  "\n"), command_line);
> +			  "\n"
> +			  "To abort and get back to the state before \"git rebase\", run "
> +			  "\"git rebase --abort\".\n"), command_line);
>   		status = 1;
>   	}
>   
> diff --git a/t/t7512-status-help.sh b/t/t7512-status-help.sh
> index 08e82f7914..ca7ef66ae3 100755
> --- a/t/t7512-status-help.sh
> +++ b/t/t7512-status-help.sh
> @@ -206,6 +206,7 @@ No commands remaining.
>   You are currently editing a commit while rebasing branch '\''rebase_i_edit'\'' on '\''$ONTO'\''.
>     (use "git commit --amend" to amend the current commit)
>     (use "git rebase --continue" once you are satisfied with your changes)
> +  (use "git rebase --abort" to check out the original branch)
>   
>   nothing to commit (use -u to show untracked files)
>   EOF
> @@ -240,6 +241,7 @@ Next command to do (1 remaining command):
>     (use "git rebase --edit-todo" to view and edit)
>   You are currently splitting a commit while rebasing branch '\''split_commit'\'' on '\''$ONTO'\''.
>     (Once your working directory is clean, run "git rebase --continue")
> +  (use "git rebase --abort" to check out the original branch)
>   
>   Changes not staged for commit:
>     (use "git add <file>..." to update what will be committed)
> @@ -278,6 +280,7 @@ No commands remaining.
>   You are currently editing a commit while rebasing branch '\''amend_last'\'' on '\''$ONTO'\''.
>     (use "git commit --amend" to amend the current commit)
>     (use "git rebase --continue" once you are satisfied with your changes)
> +  (use "git rebase --abort" to check out the original branch)
>   
>   nothing to commit (use -u to show untracked files)
>   EOF
> @@ -317,6 +320,7 @@ Next command to do (1 remaining command):
>   You are currently editing a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
>     (use "git commit --amend" to amend the current commit)
>     (use "git rebase --continue" once you are satisfied with your changes)
> +  (use "git rebase --abort" to check out the original branch)
>   
>   nothing to commit (use -u to show untracked files)
>   EOF
> @@ -347,6 +351,7 @@ Next command to do (1 remaining command):
>     (use "git rebase --edit-todo" to view and edit)
>   You are currently splitting a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
>     (Once your working directory is clean, run "git rebase --continue")
> +  (use "git rebase --abort" to check out the original branch)
>   
>   Changes not staged for commit:
>     (use "git add <file>..." to update what will be committed)
> @@ -383,6 +388,7 @@ Next command to do (1 remaining command):
>   You are currently editing a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
>     (use "git commit --amend" to amend the current commit)
>     (use "git rebase --continue" once you are satisfied with your changes)
> +  (use "git rebase --abort" to check out the original branch)
>   
>   nothing to commit (use -u to show untracked files)
>   EOF
> @@ -414,6 +420,7 @@ Next command to do (1 remaining command):
>   You are currently editing a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
>     (use "git commit --amend" to amend the current commit)
>     (use "git rebase --continue" once you are satisfied with your changes)
> +  (use "git rebase --abort" to check out the original branch)
>   
>   nothing to commit (use -u to show untracked files)
>   EOF
> @@ -445,6 +452,7 @@ Next command to do (1 remaining command):
>     (use "git rebase --edit-todo" to view and edit)
>   You are currently splitting a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
>     (Once your working directory is clean, run "git rebase --continue")
> +  (use "git rebase --abort" to check out the original branch)
>   
>   Changes not staged for commit:
>     (use "git add <file>..." to update what will be committed)
> @@ -482,6 +490,7 @@ Next command to do (1 remaining command):
>   You are currently editing a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
>     (use "git commit --amend" to amend the current commit)
>     (use "git rebase --continue" once you are satisfied with your changes)
> +  (use "git rebase --abort" to check out the original branch)
>   
>   nothing to commit (use -u to show untracked files)
>   EOF
> @@ -515,6 +524,7 @@ Next command to do (1 remaining command):
>   You are currently editing a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
>     (use "git commit --amend" to amend the current commit)
>     (use "git rebase --continue" once you are satisfied with your changes)
> +  (use "git rebase --abort" to check out the original branch)
>   
>   nothing to commit (use -u to show untracked files)
>   EOF
> @@ -548,6 +558,7 @@ Next command to do (1 remaining command):
>     (use "git rebase --edit-todo" to view and edit)
>   You are currently splitting a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
>     (Once your working directory is clean, run "git rebase --continue")
> +  (use "git rebase --abort" to check out the original branch)
>   
>   Changes not staged for commit:
>     (use "git add <file>..." to update what will be committed)
> @@ -587,6 +598,7 @@ Next command to do (1 remaining command):
>   You are currently editing a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
>     (use "git commit --amend" to amend the current commit)
>     (use "git rebase --continue" once you are satisfied with your changes)
> +  (use "git rebase --abort" to check out the original branch)
>   
>   nothing to commit (use -u to show untracked files)
>   EOF
> @@ -718,6 +730,7 @@ No commands remaining.
>   You are currently editing a commit while rebasing branch '\''bisect'\'' on '\''$ONTO'\''.
>     (use "git commit --amend" to amend the current commit)
>     (use "git rebase --continue" once you are satisfied with your changes)
> +  (use "git rebase --abort" to check out the original branch)
>   
>   You are currently bisecting, started from branch '\''bisect_while_rebasing'\''.
>     (use "git bisect reset" to get back to the original branch)
> @@ -987,6 +1000,7 @@ No commands remaining.
>   You are currently editing a commit while rebasing branch '\''several_commits'\'' on '\''$ONTO'\''.
>     (use "git commit --amend" to amend the current commit)
>     (use "git rebase --continue" once you are satisfied with your changes)
> +  (use "git rebase --abort" to check out the original branch)
>   
>   nothing to commit (use -u to show untracked files)
>   EOF
> @@ -1015,6 +1029,7 @@ Next commands to do (2 remaining commands):
>   You are currently editing a commit while rebasing branch '\''several_commits'\'' on '\''$ONTO'\''.
>     (use "git commit --amend" to amend the current commit)
>     (use "git rebase --continue" once you are satisfied with your changes)
> +  (use "git rebase --abort" to check out the original branch)
>   
>   nothing to commit (use -u to show untracked files)
>   EOF
> @@ -1044,6 +1059,7 @@ Next commands to do (2 remaining commands):
>   You are currently editing a commit while rebasing branch '\''several_commits'\'' on '\''$ONTO'\''.
>     (use "git commit --amend" to amend the current commit)
>     (use "git rebase --continue" once you are satisfied with your changes)
> +  (use "git rebase --abort" to check out the original branch)
>   
>   nothing to commit (use -u to show untracked files)
>   EOF
> @@ -1064,6 +1080,7 @@ Next command to do (1 remaining command):
>   You are currently editing a commit while rebasing branch '\''several_commits'\'' on '\''$ONTO'\''.
>     (use "git commit --amend" to amend the current commit)
>     (use "git rebase --continue" once you are satisfied with your changes)
> +  (use "git rebase --abort" to check out the original branch)
>   
>   nothing to commit (use -u to show untracked files)
>   EOF
> diff --git a/wt-status.c b/wt-status.c
> index b17372390c..94fd14a058 100644
> --- a/wt-status.c
> +++ b/wt-status.c
> @@ -1527,9 +1527,12 @@ static void show_rebase_in_progress(struct wt_status *s,
>   		else
>   			status_printf_ln(s, color,
>   					 _("You are currently splitting a commit during a rebase."));
> -		if (s->hints)
> +		if (s->hints) {
>   			status_printf_ln(s, color,
>   				_("  (Once your working directory is clean, run \"git rebase --continue\")"));
> +			status_printf_ln(s, color,
> +				_("  (use \"git rebase --abort\" to check out the original branch)"));
> +		}
>   	} else {
>   		if (s->state.branch)
>   			status_printf_ln(s, color,
> @@ -1544,6 +1547,8 @@ static void show_rebase_in_progress(struct wt_status *s,
>   				_("  (use \"git commit --amend\" to amend the current commit)"));
>   			status_printf_ln(s, color,
>   				_("  (use \"git rebase --continue\" once you are satisfied with your changes)"));
> +			status_printf_ln(s, color,
> +				_("  (use \"git rebase --abort\" to check out the original branch)"));
>   		}
>   	}
>   	wt_longstatus_print_trailer(s);
> 
> base-commit: ea97ad8d017de0c9037451a78008a0fd60abea0c
Previous: Harald Nordgren via GitGitGadgetNext: Junio C Hamano
Message 2 of 14 in “rebase: mention --abort alongside --continue”
  1. rebase: mention --abort alongside --continueHarald Nordgren via GitGitGadget, Jun 15, 2026
  2. Phillip WoodJun 16, 2026
  3. Junio C HamanoJun 16, 2026
  4. Harald NordgrenJun 17, 2026
  5. Phillip WoodJun 17, 2026
  6. Junio C HamanoJun 17, 2026
  7. Harald NordgrenJun 18, 2026
  8. Junio C HamanoJun 19, 2026
  9. Harald NordgrenJul 16, 2026
  10. Phillip WoodJul 16, 2026
  11. Junio C HamanoJul 16, 2026
  12. Harald NordgrenJul 18, 2026
  13. Phillip WoodJul 18, 2026
  14. Junio C HamanoJul 20, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.