To Patch or Not To Patch
Sep 25, 2022
Recently a non-programmer friend kept reciprocating the whole project files with another program by changing a few lines on each update. The solution is an old practice of sending a patch file.
A patch file is a snippet of changes to the base code. This approach allows sharing and updating of code efficiently.
We need to command to accomplish the task.
The diff command:
diff -u file_origin file_update > change.patch
Now you send the changed patch to the recipient that holds the file_origin. The recipient can apply the changes to their file by the patch command.
The patch command:
patch < change.patch
I hope this helps.