I've improved an existing Free Software application and wanted to save my changes in a default .patch format.
No big deal, but unfortunately, I did not only edit previously existing files, but also added new ones.
So, calling diff with "-c" (context) and "-r" recursive, only created patch information for files that exist in both versions:
Code: Select all
diff -cr original_version_folder/ my_modified_version_folder/ > tool-1.0.0_to_1.0.1.patch
If you add the "-N" option to "diff", it will treat non-existent files as empty. That's exactly what we want:
Code: Select all
diff -Ncr original_version_folder/ my_modified_version_folder/ > tool-1.0.0_to_1.0.1.patch