Skip to content

Offer to bring uncommitted changes when switching worktrees (parity with branch switching) #22756

Open

Description

@Arif-un

The feature request

Summary

When switching branches in a single checkout, Desktop offers to bring your uncommitted changes along. Switching between worktrees has no equivalent, so relocating in-progress work between worktrees requires dropping to the terminal. This is a request to add that “bring my changes” flow to worktrees.

Reopening #22592. The original was closed as working-as-intended, but that reasoning only addressed the overwrite-protection half of the prompt, not the change-relocation half this request is actually about.

Background: the prompt does two things

When you switch branches in a single-branch checkout, the prompt exists for two independent reasons:

  1. Safety — avoid overwriting or losing uncommitted files in the working directory.
  2. Convenience — carry uncommitted changes to the target branch (“Bring my changes to X”).

The prior close covered only reason 1. That’s correct: worktrees each have their own directory, so nothing gets overwritten and the safety concern doesn’t apply. But reason 2 has no worktree equivalent, and that’s the gap.

The gap

Example:

  • Worktree A on feature-a, worktree B on feature-b.
  • I start editing in A, then realize the change belongs on feature-b.
  • Single-branch mode: switching to feature-b offers to bring the uncommitted changes along.
  • Worktrees: no such option. The changes are stranded in A. To move them I have to git stash in A and git stash pop in B from a terminal, which defeats the purpose of using Desktop.

The same gap applies when moving a worktree back into the main repo: no prompt to bring or leave the in-progress changes.

Proposed solution

When switching to another worktree (or moving a worktree into the main repo) with uncommitted changes present, offer the same choice branch switching already does:

Bring my changes to the target worktree, or
Leave my changes here.
Safety confirmation isn’t needed (separate directories), so this is purely the relocation option.

Additional context

No response

Activity

  1. desktop-triage commented on Aug 20, 2026

    @desktop-triage

    Caution

    agentic threat detected
    Threat detection flagged this output in warn mode. Manual review is REQUIRED before any follow-up automation.

    Details

    Potential security threats were detected in the agent output.

    Review the workflow run logs for details.

    Suggesting the enhancement label: this requests new functionality — offering to "bring my changes" when switching between worktrees (or moving a worktree into the main repo), mirroring the existing branch-switch prompt — and includes a concrete example and proposed solution. Note this is closely related to #22592 ("Ask user to bring changes from worktree to main repo"), which was closed as working-as-intended for the overwrite-safety concern; this issue explicitly reframes the request around the change-relocation convenience that #22592's closure didn't address, so it isn't a duplicate but a follow-up worth reviewing alongside it.

    Generated by Issue Triage (skills-driven) for #22756 · auto · 21.1 AIC · ⌖ 1.57 AIC · ⊞ 8K · ◷

  2. github-actions commented on Aug 26, 2026

    @github-actions
    Contributor

    Thank you for your issue! We have categorized it as an enhancement (feature or improvement) request, and it has been added to our backlog. In doing so, we are not committing to implementing this feature at this time, but, we will consider it for future releases based on community feedback and our own product roadmap.

    Unless you see the help wanted Issues marked as ideal for external contributors label, we are not currently looking for external contributions for this feature.

    If you come across this issue and would like to see it implemented, please add a thumbs up! This will help us prioritize the feature. Please only comment if you have additional information or viewpoints to contribute.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions