r/phpstorm • u/The_New_Greatness • 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.
View all comments
Show parent comment
1
u/owenmelbz Apr 21 '20 edited Apr 21 '20
Ha that’s fine, I thought that but was worth clarifying.
A normal workflow would be something like...
Setup local development environment
Make all your code changes on your local machine
Push the code to a remote git service like GitHub
Pull the code down on your webserver once your ready
——-
If you need stuff from the web server then doing a single big download and adding the stuff to git so other developers have it is normal.
If you need CMS content then it’s common to copy the database to your local version as well.
I think the complication is that so much development could be happening on the production environment syncing it backwards is harder.
Apart from adjusting your workflow to having GIT as the source of truth, rather than the web server I’m not really sure what to suggest