I want to migrate changes made on a local copy on a development machine to a local copy on a production machine. What’s the best way to export changes from my local copy?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The way I would do this would be to commit the changes on the development machine to the repository, then update the production machine checkout. That ensures that everything is logged and updated properly.
However, I presume that isn’t a desirable option for your situation (or you didn’t do a checkout from the repository on your production server), so the easiest way would be to export your development machine checkout, then overwrite the production machine copy. If you don’t delete the production copy, then only the files in your development export will overwrite, and you’ll keep any production-specific files you may have (logfiles, etc.).
A slightly less-risky option (and the one I’d do, for safety’s sake) would be to copy just those files that have been modified in the development checkout, and overwrite their counterparts in the production copy. This is much more manual (unless you write a script to automate the copy-into-production), but you’re guaranteed not to overwrite anything you didn’t intend to on the production copy.
I’ve done all three methods before, and I honestly prefer the first one for simplicity, reversibility, and logging. If something is wrong, I can immediately revert back to the last stable copy, and it’s extremely easy to check what version of the codebase the production is using.