we have one version , for demo. just called file.txt with version1 as the content.
after we change it to version 2 , we can run git diff and redirect output to a patchfile.
by default, diff put a/b as the prefix.
then we reset the workspace and try to apply the patch
for some version, you might put patch –p1 to apply the patch , basically means ignore the a/b prefix.
for the generation, we can put –-no-prefix to remove the prefix
for binary file, we can put –-binary option to generate the patch.
and use git apply –binary to apply the patach.
there might be several commits after the last update, you can use format patch to generate one by one if you like
to apply stacks patch