A
A
Alexander Andreev2018-06-26 11:19:34
git
Alexander Andreev, 2018-06-26 11:19:34

Is this the right way to work with git and phpStorm?

Argument with a colleague. We are running a project (online store), all files are in git. The store contacts the company's internal server via SOAP for up-to-date stock and discounts. The company's server sends this data only to a specific hosting ip on which the store is located, nothing works without SOAP. Those. deploying a full-fledged sandbox on a local server will not work.
I'm working on a project in the Eclipse IDE via Remote System Explorer, essentially FTP. The work is going on on dev hosting (SOAP is also open to him) and occasionally on the battlefield (in emergency cases). I merge the dev and prod branches on a separate stage copy of the site, after checking everything goes to prod. A colleague works through phpStorm, as I understand it, working with git is arranged differently there, the point is that he makes edits on the local server, i.e. somehow files are downloaded from a remote server where the site is located, then it makes changes, somehow tests them (I still don’t understand, I’ll ask more about this) then everything goes to git, and when phpStorm connects to a remote server, it synchronizes the files automatically and they come to the server not from git, but, as it were, they are uploaded separately via FTP. But on the server, too, git, he sees them as modified or new. It turns out to upload edits to the server, you need to demolish them via git reset --hard and then do git pull origin master to pull them from the git. If you do not immediately git reset --hard, then these files can get confused with public pages that are periodically corrected by content managers and SEO specialists right on the battlefield. It turns out they need to be weeded out, saved somewhere, then git reset --hard , then git pull origin master and then manually return what SEO and content ruled.
This is the first time I see such a method of work. I think that if it is not possible to make a full-fledged sandbox locally, then it is better to work through another IDE or FTP without any auto-synchronization of files. Maybe I'm wrong or my colleague has something not completely or not configured correctly in phpStorm?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey Gornostaev, 2018-06-26
@sergey-gornostaev

  1. Developing outside of version control is evil;
  2. Edit prod - evil;
  3. Not being able to write tests with mocks is a shame.

Y
Yan-s, 2018-06-26
@Yan-s

and when phpStorm connects to a remote server, it synchronizes the files automatically and they come to the server not from git, but, as it were, uploaded separately via FTP

It seems to me that your friend is a handyman. And PhpStorm has nothing to do with this problem. GIt is git, and here is the IDE.
And why would it be taken out in the admin panel interface? This is content. Or in another mechanism, not under the git.

K
Kirill Levunin, 2018-06-26
@klevunin

There you can work as you like in phpStorm. It's just an editor.
You can and should work with Git from the command line. There is also a built-in utility for working with it. There is also a "own" version control system - truncated.
phpStorm can also work on a remote host - with a database and files. So download everything to fix it and fill it back. And automatically catch and upload any change.
Usually in this mode they do not work with production. And in production, everything is updated when there is a new version that has passed the tests. It is not necessary to upload files to production via SFTP, if you have git there, then git and update.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question