Reputation: 37
Now we have standard workflow where we work localy, then push to Git repo and then deployment from Git repo to FTP, where our clients use website, but I still find difficult to do some additions or changes on website after some time.
For example after a year, when client wants to add some new things.
What I do now - I download all files from FTP to run up to date website locally, then push them to Git repo, I do what is needed, then push again to Git and then deployment to live.
What I want to know is - is there some way to pull changes to Git repo from live server to have up to date website without need of downloading all files again and then uploading them all?
Example: After a year client wants new page - I'd do pull from live to git, then pull to my local environment. Then I can edit website localy, push it back and deploy back to live server.
Thank you very much for your advice and ideas!
Upvotes: 0
Views: 89
Reputation: 142412
Use the git format-patch
to generate only the diff files (patches) and the upload/download only them.
git format-patch HEAD~X // x is the number of commits you need
Here is a demo on how to create patches and what are they.
Upvotes: 1