-
Notifications
You must be signed in to change notification settings - Fork 29.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Git: Preserve open files list when switching branches #35307
Comments
any updates on ths? |
Could this be done on the extension level? |
Is anyone working on this ? |
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. |
This feature would be AMAZING |
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. |
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. :( |
This is the feature I want most to be added to VS code |
This is something I'd really like too. I'd like to try my hand at implementing this feature. I have some questions for someone who knows the codebase better than I do.
|
Any news? At all? |
The Restore Editors extension helps with this issue a lot. |
@romines That doesnt help too much. It has to be automatic not manual. |
I would love to see this! Switching projects is very annoying. |
Any news? |
The only thing I am really missing in VS Code! |
This would be A+. In |
Dear feature, we still miss you 🕯️ |
There may be a hard dependency on #15178 for this to be fully realized - I've done some research to try to unblock it but it'll definitely require some expansion of the extension API to be able to use internal services that describe the Groups of open editors. If this can be polled and modified reliably (and if we can open files into specific Groups), and Git can be polled as well, it could allow for some really interesting workflows! |
Check out this package: https://marketplace.visualstudio.com/items?itemName=eamodio.restore-editors I found it very useful |
Just found https://github.com/gkotas/vscode-restore-git-branch-tabs as well. Haven't taken it for a full spin yet, but this seems to be the right idea. |
Here's the link to the extension |
Indeed, I do realize that as I've read the discussion up to now. Why not have an official extension for performing such operations? Why not have an official extension that changes files based on the branch? This is precisely what JetBrains have done, and it works fabulously - I suggest you try their IDE for your language if you never have before.
I'm not going to go into details here or talk about workflows with worktrees, except to say that in my limited experience with them and my major experience with a branch based file changing workflow (as the feature requested in this ticket), the second way is superior. This is my opinion. You have expressed yours. Your opinion that the workflow with worktrees is superior is that - your opinion. Others want the option to have a different way. That is all I will say more on this subject. Thank you for your input. |
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 Please enable the feature, try it out, and let us know your feedback. Thank you!
|
@lszomoru Just tried it out and it works great! I do wonder if the language in the settings is a little obscure. I don't think it would be clear to someone who hasn't been following this issue what exactly "working sets" are. |
@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. |
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! |
@jtaylor-zuora, thanks for the feedback. I have filed #211621 to track this issue. |
This feature will be available in VS Code stable ( |
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. |
Thank you all for the great work. This is a great feature ❤️ |
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...
The text was updated successfully, but these errors were encountered: