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

Bug? git rebase -i --autostash fails to restore working files

From
PWPhillip Wood <phillip.wood@talktalk.net>
Date
Jul 28, 2016, 10:58 UTC
Message-ID
<222a3e5b-ff2c-799e-0fcb-cba23815019f@talktalk.net>

When running ‘git rebase -i --autostash’ if the editor fails then the rebase fails but stash is not applied so the working files are not restored. Running ‘git rebase --abort’ replies that there’s no rebase in progress. If you notice what’s happened it’s not a problem if you know to do ‘git stash apply <autostash id>’ but it’s confusing as normally the stash would be automatically applied. This happened to me when I messed up my editor configuration but you can reproduce it with

$ GIT_SEQUENCE_EDITOR=false git rebase -i --autostash HEAD^^ Created autostash: ff960d4 HEAD is now at f1b8af7 [git] Turn on rebase.missingCommitsCheck Could not execute editor

$ git rebase --abort No rebase in progress?

Best Wishes
Phillip
Next: Remi Galan Alfonso
Message 1 of 3 in “Bug? git rebase -i --autostash fails to restore working files”
  1. Phillip WoodJul 28, 2016
  2. Remi Galan AlfonsoJul 28, 2016
  3. Phillip WoodJul 28, 2016

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.