I have to generate a Patch of the changes I made.
The problem is that I have 2 branchs and I have to generate the patch of Branch2 files in relation to Branch1 diff (which is where the original files are).
How can I do this?
I have to generate a Patch of the changes I made.
The problem is that I have 2 branchs and I have to generate the patch of Branch2 files in relation to Branch1 diff (which is where the original files are).
How can I do this?
No problem if commits are on different branches. What you need is just knowing the hash of each commit. And then just run the following command:
git diff <hash-1> <hash-2> > <nome-do-patch>.patch
To apply the patch, the command is:
git apply --check <nome-do-patch>.patch
I could not patch with the
$ git apply --check <nome-do-patch>.patch
So, I went looking for it here and found another one that worked for me.
$ patch -p1 < <nome-do-arquivo>.patch