Patch
Patch
Creation
search summary copied
To create a Git patch, use
git diff
to generate the changes and redirect the output to a file. For instance,git diff > my_patch.patch
creates a patch file namedmy_patch.patch
containing the differences between the current working directory and the last commit. You can also create patches from specific commits usinggit format-patch
or between two branches usinggit diff branch1..branch2
git diff > some-changes.patch
# OR
git diff > patch.diff
Applying
git apply /Users/patch.diff