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?