Skip to content

Commit is lost when switching from the local branch to the origin branch #1352

@jtpio

Description

@jtpio

Description

Using the branches UI to switch between branches:

image

Seems to be reverting local changes.

Reproduce

  1. Clone a repo
  2. Make a change to a file
  3. Stage, commit
  4. Switch to the corresponding remote branch, for example origin/main
  5. Switch back to the local branch
  6. Changes are gone (the commit disappeared)
jupyterlab-git-branch-switch-issue.webm

Expected behavior

I would expect to be able to temporarely switch to the remote branch, and then switch back to the local branch and see the new changes again.

Context

  • JupyterLab: 4.2.5
  • Python package version: 0.50.1
  • Extension version: 0.50.1
  • Git version:
  • Operating System and its version:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions