How to Setup Git+PhpStorm with developer and live server correctly?

Hi,

 

I try to keep the questions as simple and short as possible:

I got one developer server and one live server:

1) Dev: dev.domain.com

2) Live: domain.com

Bot have their own Cpanel.

I want to work with several developers on the dev.domain.com server and then push the tested files to the live system.

How to set this up with PhpStorm?

 

Thank you very much

 

Addition information:

Currently I am editing the files on dev.domain.com with ftp and auto upload it after save with phpstorm. But I hired another developer and this might result in overwritten files and lost code. Thats why I want to use Git.

I added a git repository via cpanel on dev.domain.com. then clone it locally and edit the files and commit it to the dev.domain.com. But how do I get the files to Live server, when they are working on dev.domain.com?

Thank you very much

1 comment

But how do I get the files to Live server, when they are working on dev.domain.com?

How did you do that before you installed Git to dev.domain.com? Is there something wrong with this way now?

I guess the most reasonable way would be initializing a Git repository on domain.com that have a remote leading to dev.domain.com, so that you could fetch the newest revision whenever you need the production server to be updated.

Please note that PhpStorm is not able to run Git operations remotely, so you'll need to do that via Terminal.

0

Please sign in to leave a comment.