Search code examples
gitbranchphpstormjetbrains-ide

PhpStorm, open files depending on the git branch


When I work, I always have 2 to 6/7/... branches where I edit usually completely different files. These branches usually don't exist for more than a few days, 2 or 3 weeks at most.

As I don't want to look for the files I modified or had opened last time I worked on one particular branch, I'd like to have some sort of solution, maybe a plugin, for this problem.

Maybe I'm missing a functionality of PhpStorm (or Webstorm,IntelliJ,..) Or maybe there is a plugin for this?


Solution

  • According to the documentation, it is possible to restore workspace on branch switching :

    PhpStorm saves your context (a set of opened files, the current run configuration, and breakpoints ) provided that the Restore workspace on branch switching option is enabled in the Settings/Preferences dialog (Ctrl+Alt+S) under Version Control | Confirmation. When you switch to a branch, PhpStorm automatically restores your context associated with that branch.