diff -C 4 orig_file.c new_file.c >myfile.patch
Here the “C 4″ specifies to add a 4 line context to understand where the patch fits for the user. To apply the patch, copy the file to the directory where the patch needs to be applied and execute the following command. Here, the p0 specifies to take the filename only and not the entire path which will be specified in the patch file
patch -p0 < myfile.patch
No comments:
Post a Comment