Patch is a file that consists of a list of differences and is usually created with the help of the git diff command. In the Drupal community, developers make use of this patch file as a contribution to fix an issue or enhance a feature in a module, theme, or even for Drupal core.
Below are the step for creating a patch
1 - Create and set up a repository on GitHub specifically for creating patch files. It is best to maintain a single git repository for the patch files that you will be applying to your drupal project.
2 - Move the module/theme or core files that you need to generate patches to the newly created git repository
3 - Make the necessary changes to a file on your local
4 - Verify that the “git status” command shows the file that you have modified.
5 - To generate the patch, use the following command:
git diff --no-prefix [file-name] > ./file-name.patch
No comments:
Post a Comment