I like:
git format-patch HEAD~<N>
where <N>
is number of last commits to save as patches.
The details how to use the command are in the DOC
UPD
Here you can find how to apply them then.
UPD For those who did not get the idea of format-patch
Add alias:
git config --global alias.make-patch '!bash -c "cd ${GIT_PREFIX};git add .;git commit -m ''uncommited''; git format-patch HEAD~1; git reset HEAD~1"'
Then at any directory of your project repository run:
git make-patch
This command will create 0001-uncommited.patch
at your current directory. Patch will contain all the changes and untracked files that are visible to next command:
git status .