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