I have a PhpStorm project linked to a remote server (a VM) where I set automatic deployment, so each time I modify and save a file, it is uploaded automatically to this server. Now I want to use GIT on this project. My workflow should be the following : - Work on local copy - Saving and automatic upload to the development server - Test (open webpage on dev server) - if ok, commit from local copy. Then push, etc...
My question is : how to work with branches ? I mean, I know that when switching branch, the directory I work on can completely change. Example : my branch A contains a.html. My branch B only contains b.html If I switch branch locally, the content of my folder will change. Will PhpStorm will add/delete a.html/b.html on my deployment server each time I switch branch ? Obviously, it's not what I want. How these changes will be reflected on the deployment server, how PhpStorm manage it ? Thank you for your help
For something like this, you can approach a number of different ways. Here's a couple.
I prefer the second method as I don't have to wait for cron to do it's thing and I can see when an error occurs such as a merge conflict of some sort.
Just in case someone is looking for the solution:
Tools > Deployment > Options
Uncheck Skip external changes
Please Note: Option Automatic Upload (always)
must be checked
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With