How to Diff localhost code with uploaded (and tweaked) hosted code?
I do my development locally on a Linux machine running apache. Once the code is ready, I upload it to my hosting service provider on their cloud, using Midnight Commader and the built-in FTP functionality.
Sometimes I tweak the code directly on the hosting platform, without updating it on my local machine
What I need is a way to do a directory diff comparison, and compare what's on my local machine to what I have uploaded (and maybe modified) on the hosting service.
Is there some way I can do a diff comparison like this please, as I need to make sure what's on my localhost is up to date with what's on the hosting machine servers.
The answer is in your question. If you know that you should not directly edit the live code, why do you do it? Seriously, if you REALLY need to amend code to suit the on-line environment, then copy the amended file(s) back to your development environment once you are happy with the amendments. FTP works both ways. Or, if the FTP utility you use does not, use one that does.
Also, if you have made sundry changes without copying back (which is silly because you will almost certainly overwrite the changes sometime), what use is a diff file? Just do a global copy back from the live area, to get a valid starting point, and keep the areas in sync in future.
Just a thought: I trust you keep version backups of each site, so that you have a copy off-line of the live code separate from the development version you are currently working on? If not, how do you step back if your tweaking (live or development) goes awry?
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread