Skip to content

'stash changes and continue' doesn't work for 'rebase current branch'. just stashes #21904

Open

Description

@gzahavi

The problem

if you have uncommitted changes on your branch and use the 'rebase current branch' feature, it prompts you to 'stash changes and continue'

however, if you then click 'stash changes and continue', it stashes your changes and then stops. it doesn't finish and perform the rebase

Release version

3.5.7

Operating system

Windows 11

Steps to reproduce the behavior

  • make a main branch with some commits
  • make another branch feature off of main and add some commits to it
  • add more commits to main
  • on the feature branch, make some changes but don't commit them
    • then select branch > rebase current branch... > main
  • it will prompt you to 'stash changes and continue'. click to do so

then it stashes your current changes, but that's it. if you check the branch history, you can see that it hasn't rebased feature onto main as it should have

Log files

No response

Screenshots

No response

Additional context

No response

Activity

  1. babakks commented on Apr 10, 2026

    @babakks
    Member

    Thanks for reporting this, @gzahavi! 🙏

    I could reproduce this as you instructed. Seems like after the stashing changes, Desktop doesn't retry git rebase. Actually, if you click try again, it works this time (without the prompt for stashing). So, it's either:

    • A bug, or
    • We should improve the messaging and explicitly ask the user to try again

    Anyway, I'll mark it as a bug Confirmed bugs or reports that are very likely to be bugs for now.

    My repro logs

    2026-04-10T14:43:01.031Z - info: [ui] [rebase] starting rebase for branch/to-rebase at 5e5b9442c1b6f2ed0b40001f65f159b020de6d31
    2026-04-10T14:43:01.032Z - info: [ui] [rebase] to restore the previous state if this completed rebase is unsatisfactory:
    2026-04-10T14:43:01.032Z - info: [ui] [rebase] - git checkout branch/to-rebase
    2026-04-10T14:43:01.032Z - info: [ui] [rebase] - git reset 5e5b9442c1b6f2ed0b40001f65f159b020de6d31 --hard
    2026-04-10T14:43:01.063Z - error: [ui] `git -c rebase.backend=merge rebase main branch/to-rebase` exited with an unexpected code: 1.
    error: cannot rebase: You have unstaged changes.
    error: Please commit or stash them.
    
    (The error was parsed as 55: null)
    2026-04-10T14:43:01.074Z - info: [ui] [rebase] completed rebase - got Error and on tip 5e5b9442c1b6f2ed0b40001f65f159b020de6d31 - kind Valid
    2026-04-10T14:43:01.077Z - warn: [ui] [App] invalid state encountered - multi commit flow should not be active when step is null
    

    And then when I tried to rebase again, it worked:

    2026-04-10T14:48:10.379Z - info: [ui] [rebase] starting rebase for branch/to-rebase at 5e5b9442c1b6f2ed0b40001f65f159b020de6d31
    2026-04-10T14:48:10.380Z - info: [ui] [rebase] to restore the previous state if this completed rebase is unsatisfactory:
    2026-04-10T14:48:10.381Z - info: [ui] [rebase] - git checkout branch/to-rebase
    2026-04-10T14:48:10.381Z - info: [ui] [rebase] - git reset 5e5b9442c1b6f2ed0b40001f65f159b020de6d31 --hard
    2026-04-10T14:48:10.515Z - info: [ui] [rebase] completed rebase - got CompletedWithoutError and on tip 086854ea5535e8f707405add31a85a7a4a7efc30 - kind Valid
    

  2. added
    bug
    priority-2
    on Apr 10, 2026
  3. gzahavi commented on Apr 10, 2026

    @gzahavi
    Author

    if you click try again, it works this time (without the prompt for stashing)

    i see. because the stash went through in the first pass, so it can just rebase with no stash logic needed, same as if you had no changes

    A bug

    right i think it's a bug. the button says stash changes and continue, so it's expected that clicking it will stash, and then rebase. but it just stashes and then stops

    i believe there are other actions that have a 'stash changes and continue' action, that work correctly. so it's just a bug that it doesn't work fully for the rebase action

  4. gzahavi commented on May 28, 2026

    @gzahavi
    Author

    another related issue: if on the popup box you instead click 'close', github desktop goes into a state where it thinks you're in the middle of some operation. a bunch of options are disabled in the menus



    it fixes itself if you unfocus and refocus the window, or switch to the history tab and back

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpriority-2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions