<!-- Welcome! Before creating a new issue: * This is the GIT EXTENSION for JupyterLab repository. Unrelated issues will be closed. * Look at the README *Troubleshooting* section * Search for relevant issues * Check that you have updated both the jupyterlab extension and the python package to the same version * Check that you have installed Git version 2 or higher --> ## Description Using the branches UI to switch between branches:  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](https://github.com/user-attachments/assets/367437ce-ce65-4476-8382-c92fbecab71e) ## 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 <!--Complete the following for context, and add any other relevant context--> - JupyterLab: 4.2.5 - Python package version: 0.50.1 <!-- Results of `conda list jupyterlab-git` or `pip show jupyterlab-git` --> - Extension version: 0.50.1 <!-- Results of `jupyter labextension list` --> - Git version: <!-- Results of `git --version` --> - Operating System and its version: