Below I worked for me.
Source: How to create and apply a patch using Git
First, see what changes have been made to the patch . You can do it easily with git apply
git apply --stat fix_empty_poster.patch
Please note that this command SHOULD NOT apply the patch, but only shows statistics about what it does. After viewing the patch file with your favorite editor, you can see what the actual changes are.
Next, you are interested in how unpleasant the patch will be . git allows you to test a patch before actually applying it.
git apply --check fix_empty_poster.patch
If you do not get any errors, the patch can be applied cleanly . Otherwise, you can see what problem you are facing.
To apply the patch, use git am instead of git. The reason for this is that git am allows you to sign the application patch. This may be useful for future reference.
git am --signoff < fix_empty_poster.patch Applying: Added specs to test empty poster URL behaviour Applying: Added poster URL as part of cli output
Well, the fixes were applied cleanly, and your main branch has been updated. Of course, repeat the tests to make sure nothing is broken.
In the git log, you will find that the commit messages contain an "Connected" tag. This tag will be read by Github and others to provide useful information on how the commit ended in code.
Abhishek Bedi Jul 29 '16 at 9:16 2016-07-29 09:16
source share