How to create the original file from the diff, I am having one of the files and deleted the other unknowingly. Is there any tool to convert the diff output to 'ed' diff (diff -e output) format or patch output format?
If you have:
then this is simply a matter of applying the diff in the usual fashion:
patch the_file <the_diff
This is just the normal use case for applying a diff.
If you have:
then you can you can simply apply the patch in reverse using patch's -R option:
patch -R the_file <the_diff
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With