HowTo: Create Patch Using Diff Command – Linux

If you have made some changes to the code and you would like to share these changes with others – the best way is to provide them as a patch file.

diff is the Linux command line tool that is used for creating patches (sometimes called diffs) and requires that you have two copies of the code: one with your changes and one without.

This article explains how to create a patch for a single file or for a whole directory using diff and how to apply this patch after. (more…)