git format-patch <commit-ish> creates a patch file for each commit made from the specified commit.
So, to export all of your uncommitted commits, just put
git format-patch origin/master -o patches/
and they will all be listed in the patches/ directory.
If you want to have a single file , add --stdout :
git format-patch origin/master --stdout > patches_$(date -I).patch
This will create a file called patches_2014-10-03.patch (or another date) with all your patches. Beware: patch or other simple patch applications cannot handle the created file. It will only work with git am .
Sidenote:
A simpler (and more reliable) thing may be to keep a copy of your repo on your thumb or the like. Then configure the multiplexer as a remote control ( git remote add thumb /media/thumbdrive ), push your fixes on it ( git push thumb master ) and return to your company, pull it out of the drive and click on start.
source share