You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Git: Preserve open files list when switching branches #35307
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...
Reacted by YegorK, FJT, Luke Petschauer, Pasquale Colaianni, ruebenacker, Aviv Hadar, Marko Bonaći, Salathiel Genese, Alexey Tsitrkop, AJ Miller and 457 more
Reacted by 蔡文心, Andreas, ljubadr, bhack, Thomas Marek, A Yashwanth, Vinícius Gajo, rturza-accenture, Jordan Bravo, Jhonatan Cruz and 37 more
Reacted by Stephen Grable, prinzt, Webworthy Design, Kuroné Kito (黒音キト), STANN co, Philippe, Deborah Köpfer, Jonathan Holt, Michał Dziardziel, Julian Richard Contreras and 104 more
Reacted by STANN co, Michał Dziardziel, Ruben Ramirez, Karl Molina, Ben Ridley, Rafe Goldberg, Edward Neuwirth, cryo-warden, Pritam Rajput, Mendy Leizerovich and 47 more
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.
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.
Reacted by Kuroné Kito (黒音キト), Dave Rogers, Aaron Nel, Evgeny Urubkov, Connor Dooley and tejasipa
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. :(
Reacted by Brise, Alan Rusek, Martijn van der Heiden, Aaron Nel, SchmidtDawid, Nikolai Dar Hegelstad, Berk Balatacı, merusso and Adam Reece
This is the feature I want most to be added to VS code
Reacted by Michael Grant, Brise, Ed Pratt, Johann Folta, Ebenezer Isaac, Bahman Ashtari, Martijn van der Heiden, Aaron Nel, Orlandster, Sergei Andronov and 23 more
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.
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!
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!
Reacted by Nathaniel Palmer, Kristopher M F Sousa, Guillermo Julián and Adam
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.
Reacted by Marc Marquez Santamaria, Arnaud Venturi, Sérgio Dinis Lopes, Harrys Kavan, Andrii Oriekhov, ElisabethBrockhausQC and Andrew Brassaw
Activity
[-]Save file opening status each git branches.[/-][+]Preserve open files list when switching branches[/+]topaztee commentedon Feb 26, 2018
any updates on ths?
mbonaci commentedon Apr 10, 2018
Could this be done on the extension level?
moriawan commentedon Aug 10, 2018
Is anyone working on this ?
[-]Preserve open files list when switching branches[/-][+]Git: Preserve open files list when switching branches[/+]GargantulaKon commentedon Oct 17, 2018
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.
StephenGrable1 commentedon Nov 28, 2018
This feature would be AMAZING
jas-naz commentedon Dec 1, 2018
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.
webworthydesign commentedon Dec 14, 2018
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. :(
justin-mclaren commentedon Feb 19, 2019
This is the feature I want most to be added to VS code
110 remaining items
lszomoru commentedon Apr 22, 2024
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.
jtaylor-zuora commentedon Apr 22, 2024
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!
lszomoru commentedon Apr 29, 2024
Jesse Taylor (@jtaylor-zuora), thanks for the feedback. I have filed #211621 to track this issue.
lszomoru commentedon Apr 29, 2024
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.
brandonmcconnell commentedon Apr 29, 2024
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.
zwarag commentedon Apr 29, 2024
Thank you all for the great work. This is a great feature ❤️
starball5 commentedon Apr 29, 2024
Nice. I've updated my various SO answer posts (this and this)
Replace mangano-ito.git-branch-wise-session vscode extension with nat…