I used the git format-patch tool https://www.kernel.org/pub/software/scm/git/docs/git-format-patch.html
[1].
I have never used patch files myself, so forgive my
ignorance if I say something incorrect.
Create a patch to stdout
I can run a git command like
this to create a patch from the last commit
> git format-patch HEAD~1 –stdout
|
You can pipe the output to a file
> git format-patch HEAD~1 --stdout >
my.patch
|
You can also go back more than 1 commit in the history
> git format-patch HEAD~10 --stdout >
my.patch
|
This will go back 10
Add to this a user filter, and you can get just your own
code changes
> git format-patch HEAD~10 --committer=patman --stdout > my.patch
|
I upped this to 1000 commits to make sure to get all my code
changes
> git format-patch HEAD~1000 --committer=patman
--stdout > my.patch
|
This file is never intended to be used, but it is a history
of the code changes I had committed to our
repository.
References
[1] git-format-patch(1)
Manual Page
Visited 8/2014
No comments:
Post a Comment