Recently I had to create a patch file to submit to an open source project.
Here is a quick way to do it via the GitHub web-pages.
- Go to your pull request (eg: https://github.com/pentaho/pentaho-kettle/pull/8283)
- Add ".patch" to the end. Click enter.
- This will redirect you to a new page with the patch info with some additional email info, etc.
- Copy the entire text and paste it into a file. Save the file with an extension of .patch.
- I found that I needed to add a new line at the end of the patch file.
That is your patch file!
To apply the patch file:
- Create a new branch from master (or whichever branch the patch is to be applied to).
- Switch to the branch.
- Run the following command: git apply name_of_patch_file.patch
If you instead want to manually create your patch using GIT:
- Switch to the branch with your changes
- Run the following command: git diff master > ..\name_of_patch_file.patch
No comments:
Post a Comment