What is a patch file?

Think of the original file in the illustration below as the reference file for creating patches. The modified file is the new file that is constantly being updated or changed. The patch file contains the differences between the original file and the modified file:



Patching Files


When you patch a file you will also have the original reference file. By using the patch file you will create a new patched file which is identical to the modified file:


Patching Files


Can you give me an example of when I would patch a file?

Let's say you frequently draft and distribute a word document. 


After you have drafted and distributed a first draft of your document, you would then save that original draft as the reference file in order to create patches from it at a later date. 


As you modify the word document, you will save the  modified document as a separate modified file. Each time you wish to distribute a new draft of your word document, you would make a new patch file using the reference file and the modified file.