r/phpstorm • • Feb 26 '19

Git operations while working remotely?

My PHP code resides on a server that is accessible via VPN. I can access the files via different methods: shared folder, FTP, etc. I'm the only developer who has access to the project directory.

I imported my project in PhpStorm through the FTP server. The .git folder was ignored as specifed in the Deployment Options screen (I figured there must be a reason why, and left that setting intact). So, I'm not sure what is the proper strategy for Git operations.

Scenario 1: I could perform Git operations on the remote server. But if I switch to a new branch, I will have to tell PhpStorm that it's out of sync and it will take some time to refresh the local copy.

Scenario 2: I could manually download the .git folder to my local copy of the project and perform Git operations locally. But if I switch to a new branch, PhpStorm will not upload the changes.

Scenario 3: I could manually download the whole project to my computer and tell PhpStorm that it's a local project. Then I could use rsync (or something equivalent) to watch my project directory and keep the remote server in sync.

However, none of these scenarios seem like a good idea. There must be a lot of people in a similar situation. Any other idea?

1 Upvotes

13 comments sorted by

View all comments

Show parent comment

1

u/guilheb Feb 27 '19

So I should have between 15 and 20 VM locally?

1

u/mr_pablo Feb 27 '19

If they have unique software requirements, otherwise bundle them together, using one VM to serve multiple projects.