Local filesystem storage of project branches

Oddly I don't think I've had to face this in a situation where it really matters.

I have a project with a production branch and a dev branch. I need to test a CMS add-on whose version differents than production.

In my local filesystem, I would normally add the code to system/user/addons/my-new-addon, test, add, and commit, after checking out the 'dev' branch within PhpStorm.

Now that I've done that, if I were to switch/check out the production branch in PhpStorm where would the updated code for 'my-new-addon' go? 

Does PHPStorm swap out the local filesystem files based on which branch is checked out?

 

0

Sorry, missed the thread!

First of all, the VCS support in IDE is a some sort of graphic wrapper over the Git itself, so it should behave in the same way as Git does.
In the mentioned scenario, the local filesystem files are automatically swapped out based on which branch is currently checked out (no matter if you did it with the IDE or via the command-line). So, if you checked out the 'dev' branch in PhpStorm and added your new add-on to system/user/addons/my-new-addon, then switched to the 'production' branch, the updated code for 'my-new-addon' would no longer be present in that location as it would have been swapped out by the code for the 'production' branch.

0

请先登录再写评论。