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

rebase fails mid way through due to locally modified file?

From
Sskillzero@gmail.com <skillzero@gmail.com>
Date
Oct 10, 2012, 00:31 UTC
Message-ID
<CANRUUDNoUNMy1qHkYt-_wwxGtWrRY9vi8-CjzY8WhJ2gur+zTg@mail.gmail.com>

I frequently see rebase fail after applying several commits because git thinks there are local changes. Before the rebase started, there were no local changes and after the rebase fails, doing a git status doesn't show any locally modified files. I was seeing this on git 1.7.x and I also tried updating to git 1.8rc1 and it fails there too. I see progress like this:

--
Applying: Commit X
Applying: Commit Y
Applying: Commit Z
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
error: Your local changes to the following files would be overwritten by merge:
	MyFile.h
Please, commit your changes or stash them before you can merge.
Aborting
Failed to merge in the changes.
Patch failed at 0013 Commit A
The copy of the patch that failed is found in:
   /Source/.git/rebase-apply/patch

When you have resolved this problem, run "git rebase --continue". If you prefer to skip this patch, run "git rebase --skip" instead. To check out the original branch and stop rebasing, run "git rebase --abort". --

If I git rebase --abort then retry, it usually fails again, but sometimes on a different file. Once in a while, retrying will succeed.

Is this a known issue? I can't make the source for my repo available, but is there some way I can provide more info to help narrow this down?

Next: Peter Krefting
Message 1 of 2 in “rebase fails mid way through due to locally modified file?”
  1. skillzero@gmail.comOct 10, 2012
  2. Peter KreftingOct 11, 2012

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.