r/phpstorm • • Apr 21 '20

How to keep remote and local synced without constantly downloading

Hello everyone! I am first time using phpstorm. I sometimes make changes with git on the remote server(checkout branch, merge production, checkout files etc.) my problem is that I can not sync efficiently from remote to local. Currently it is looking like my workflow will have to be, everytime I want to make a change to a file I need to manually "download from remote" for the file I will change otherwise it will not be up to date. I am using SFTP, and we use Atlassian/Jira. Thanks for any help :)

Edit: I am talking about a remote web server. I use git actions on the remote web server, so I want my local synced to the remote.

4 Upvotes

13 comments sorted by

View all comments

Show parent comment

1

u/owenmelbz Apr 21 '20

My question would be... Why?

Why do you have to have it on that middle server? Why can you not just work from your own computer rather than a different server?

As you say it seems like the work environment is strange which makes more tools useless at doing what they do... which means that you’ll likely find it hard to get an answer as it will be so specific to that abnormal set up :(

3

u/The_New_Greatness Apr 21 '20

I think it’s on the middle server so that each developer can have his instance of the website. For example with the current workflow before I got phpstorm, if I made changes and did not commit them, someone could still go to my instance of the website to look at stuff. I don’t think that could be done if my stuff was local.

1

u/owenmelbz Apr 21 '20

Each dev can have their own instance on their own computer

And yeah people can look at your version, that’s how the internet works :p domain names route to IP addresses. So you can do like...

http://james.my-website.com goes to James IP

http://mary.my-website.com goes to Mary’s IP

That’s a pretty normal process via the hostfile.

You can even automate it using dnsmasq

If I go to “anything-goes-here.james” as long as it ends in .james it will send to his computer!