Using PHPStorm On Remote VPS That Has GIT
Let me try to explain my setup as best I can. I don't like having a local web server installed on my Mac, it's really annoying, I prefer to run my development by a virtual machine that runs CentOS and is setup as a full development server on it's own using GIT for projects.
I have been trying out PHP Storm, which I actually like for the most part, and I have it connected to SSH on the development virtual machine so access and edit files. The problem is this connection doesn't take into account that each project on the virtual machine is running via a GIT repo. So when I log on to SSH and change the branch PHP storm doesn't pick that up.
So my question is: Is there any way to setup php storm to actually detect what branch I am on via the remote virtual machine rather than having to setup a local web server on my Mac? What I want is to be able to edit the files on whatever branch I have set via ssh in php storm so the changes can be immediately tested via the virtual machine rather than locally on my Mac.
Is this possible or am I going to have to install the web server on the development machine itself?
请先登录再写评论。
Hello,
Why don't use a deployment configuration that will upload files to your VPS and use its remote web server as well?
You can find details in https://confluence.jetbrains.com/display/PhpStorm/Deployments+in+PhpStorm .
Same for Git - you can work with remote repo too: https://www.jetbrains.com/help/phpstorm/set-up-a-git-repository.html .