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

Re: REBASE_HEAD still exists after success end rebase

From
Matt Hunter <m@lfurio.us>
Date
Jul 28, 2026, 09:39 UTC
Message-ID
<DKA3RP12A8LU.2VD89MQ7G2KLL@lfurio.us>
In-Reply-To
<edfc868b-6be6-4871-a539-e70791db216d@mail.ru>
On Tue Jul 28, 2026 at 4:26 AM EDT, Long 76 wrote:
>
> In other words REBASE_HEAD exists if ogirinal commit in new branch 
> modified and need call git push --force to send it to server. Please fix 
> it, thanks!

I ran into this not that long ago too, while working on a script. It looked like this behavior depended on how the _last_ item in the rebase todo list was handled. I found if the last action was a squash or edit (I don't think reword did this), then REBASE_HEAD was left behind.

Also, if rebase stops on a break command, then REBASE_HEAD will be missing, even though a rebase is still in-progress.

I made a very short-lived effort to look into why this "bug" was happening. I say "bug" in quotes, because I'm not even sure if it is even problematic behavior.

I solved my need at the time (detecting a rebase in progress) by checking for the existence of either of the 'rebase-merge' or 'rebase-apply' directories in $GIT_DIR.

>
> --
> Long76
Previous: Long 76Next: Phillip Wood
Message 2 of 6 in “REBASE_HEAD still exists after success end rebase”
  1. Long 76Jul 28, 2026
  2. Matt HunterJul 28, 2026
  3. Phillip WoodJul 28, 2026
  4. Long 76Jul 28, 2026
  5. Long 76Jul 28, 2026
  6. Long 76Jul 28, 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.