Answer the question
In order to leave comments, you need to log in
How to properly deploy a project to a test server + git from phpstorm + git?
I never worked closely with GIT, usually it was only local. Yes, and projects with a separate test server, production and git did not have to be configured.
Now I'm doing such a bunch
1. Production server and GIT on it
2. Test server and GIT on it
3. Development via PhpStrom. All files are edited locally and uploaded via FTP to the test server.
There is no local server. All have one remote repository. I understand how to upload working code from the repository to production.
The question is:
How do I properly set up PhpStrom and the test server?
It seemed to me that the easiest option was to keep GIT only on the test server. Upload files to it and make commits via SSH. But then, in case of a branch change on the test server, PhpStorm will start downloading all the files again, which seems not very convenient.
The same thing if you keep GIT only locally with PhpStorm. If I commit at my place and upload via FTP to the test server, then everything will be fine. But also, when changing the branch, you will have to upload all the new files to the test server.
Keep GIT both there and there, there will be conflicts as I understand it.
I read about automatic deployment via GIT, when I push in PhpStrom, these changes are pulled from the repository on the test server and rolled. But it seems like some kind of crutch, no?
As a result, I could not either formulate the question correctly or find the answer.
What is the best option?
It is possible to start a local server, but I would like to do without it.
Thank you!
Answer the question
In order to leave comments, you need to log in
For myself, I decided to abandon GIT on the test server. As a result, I have GIT locally and in production. I made changes in the code, saved it, uploaded it to the test one via FTP. If everything is good, I made a commit locally, made a push and made a pull in production.
I considered this a more correct and simple solution than keeping GIT everywhere.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question