When you run the command git apply
you can create a commit with changes from a text file:
git apply ~/Downloads/patch.txt
How do I create this patch file from an existing commit ?
When you run the command git apply
you can create a commit with changes from a text file:
git apply ~/Downloads/patch.txt
How do I create this patch file from an existing commit ?
As mentioned in the comments of the question, just use the command git format-patch
according to the git manual, it can be used in several ways, but I believe the main ones are:
git format-patch <commitish_inicial>
or
git format-patch <commitish_inicial>..<commitish_final>
So git
generates one or more files in 0000-algo-como-a-msg-de-commit.patch
format that can be applied with git apply
.