Vscode: Git: Preserve open files list when switching branches

Created on 28 Sep 2017  ·  22Comments  ·  Source: microsoft/vscode

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...

feature-request git

Most helpful comment

Dear feature, we still miss you 🕯️

All 22 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.

  • Would this be better implemented as an extension, or in VSCode's codebase itself?
  • Where would be the proper place to store a map of branch names to open file paths such that they don't get checked into source control, but do persist across sessions? Where does VSCode store the list of open files that it restores when VSCode is closed and re-opened?
  • What's the best way to detect when a user switches their branch? Is there a way to do it without polling? This feature ought to work when the branch is switched outside of VSCode (e.g. in an external terminal)

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 Atom there is a package called git-tabs.
https://atom.io/packages/git-tabs

Dear feature, we still miss you 🕯️

There may be a hard dependency on https://github.com/Microsoft/vscode/issues/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!

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.

+1

Was this page helpful?
0 / 5 - 0 ratings

Related issues

v-pavanp picture v-pavanp  ·  3Comments

villiv picture villiv  ·  3Comments

biij5698 picture biij5698  ·  3Comments

vsccarl picture vsccarl  ·  3Comments

chrisdias picture chrisdias  ·  3Comments