Before apply the patch, we have to creat it first.
git format-patch master --stdout > fix_empty_poster.patch
This will create a new file fix_empty_poster.patch with all changes from the current (fix_empty_poster) against master.
Now apply it. First, take a look at what changes are in the patch. You can do this easily with git apply
git apply --stat fix_empty_poster.patch
Next, you’re interested in how troublesome the patch is going to be. Git allows you to test
the patch before you actually apply it.
git apply --check fix_empty_poster.patch
You can do "git apply [patch-name].patch" (Haven't try that.)
But I’ll use git am instead of git apply. The reason for this is that git am allows you to sign off an applied patch.
This may be useful for later reference.
No comments:
Post a Comment