Skip to content

Git: Preserve open files list when switching branches #35307

Closed

Description

@fujitatakesh

I suggest for saving file opening status each git branches. I think the each branches need different files on the branches. If I changed branches and close and open files every time. Next time if I changed branch again, next process is closing opening files and opening files needed to edit. And next time...

Activity

  1. changed the title [-]Save file opening status each git branches.[/-] [+]Preserve open files list when switching branches[/+] on Sep 28, 2017
  2. added
    feature-request
    on Sep 28, 2017
  3. topaztee commented on Feb 26, 2018

    @topaztee

    any updates on ths?

  4. mbonaci commented on Apr 10, 2018

    @mbonaci

    Could this be done on the extension level?

  5. moriawan commented on Aug 10, 2018

    @moriawan

    Is anyone working on this ?

  6. changed the title [-]Preserve open files list when switching branches[/-] [+]Git: Preserve open files list when switching branches[/+] on Sep 18, 2018
  7. GargantulaKon commented on Oct 17, 2018

    @GargantulaKon

    I was wondering the same thing as I noticed that IntelliJ IDEA CE has that feature. I found it really useful. For now, I have to copy the relative path of every file to keep a list of opened files and then close the files. I then switch branches and then re-open files by searching for each of them.

    I have also tried the workspaces feature to see if it saved the opened files, but alas it didn't.

  8. StephenGrable1 commented on Nov 28, 2018

    @StephenGrable1

    This feature would be AMAZING

  9. jas-naz commented on Dec 1, 2018

    @jas-naz

    I have been hoping for a feature/extension that would do this for months now. It would be great as I jump around a lot and have lots of files. I thought Workspaces was the answer but it doesn't seem to function that way.

  10. webworthydesign commented on Dec 14, 2018

    @webworthydesign

    I recently switched from IntelliJ to VSCode and this has become a big problem and will likely cause me to need to switch back. It's a shame, I'd really like to have this feature added as I'm definitely enjoying VSCode but at my job, we switch branches far too often to keep opening/closing tabs so much. :(

  11. justin-mclaren commented on Feb 19, 2019

    @justin-mclaren

    This is the feature I want most to be added to VS code

  12. 110 remaining items

  13. lszomoru commented on Apr 22, 2024

    @lszomoru
    Member

    Nathaniel Palmer (@diminutivesloop), thanks for the feedback. The current plan is to include this feature in the next Stable release, but do not yet enable it by default. We will use the next milestone to gather feedback and adjust the feature based on that. As part of that work we will also see if there is better terminology that we can use.

  14. jtaylor-zuora commented on Apr 22, 2024

    @jtaylor-zuora

    Today's VS Code Insiders release (version details below) contains the first iteration of the ability to associate editor working sets (editors, layout) with a source control branch. You can enable this feature using scm.workingSets.enabled setting. You can also use the scm.workingSets.default (current, empty) setting to control the behaviour of switching to a branch that does not yet have a saved editor working set.

    Please enable the feature, try it out, and let us know your feedback. Thank you!

    Version: 1.89.0-insider (Universal)
    Commit: 50a6f4f200c5a33f47997eb6a8966e50cf219e21
    Date: 2024-04-12T05:52:00.589Z
    Electron: 28.2.8
    ElectronBuildId: 27744544
    Chromium: 120.0.6099.291
    Node.js: 18.18.2
    V8: 12.0.267.19-electron.0
    OS: Darwin arm64 23.4.0
    

    works pretty well so far for me. I notice that if I switch branches from the terminal, it loses focus after the editor state is restored. It would be nice if the focus stayed in the terminal. Otherwise, I like it!

  15. lszomoru commented on Apr 29, 2024

    @lszomoru
    Member

    Jesse Taylor (@jtaylor-zuora), thanks for the feedback. I have filed #211621 to track this issue.

  16. lszomoru commented on Apr 29, 2024

    @lszomoru
    Member

    This feature will be available in VS Code stable (1.89) towards the second half of this week.
    I will go ahead and close this issue and any additional feedback related to this feature will be tracked separately.

  17. brandonmcconnell commented on Apr 29, 2024

    @brandonmcconnell

    I gotta say, I never thought I'd see this issue resolved. I'm almost gonna miss all the notifications about new comments in this thread. 🥹

    Good work, everyone involved. Solid fix.

  18. zwarag commented on Apr 29, 2024

    @zwarag

    Thank you all for the great work. This is a great feature ❤️

  19. starball5 commented on Apr 29, 2024

    @starball5

    Nice. I've updated my various SO answer posts (this and this)

  20. locked and limited conversation to collaborators on Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-requeston-testplanscm

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions