So, because I'm a big fan of tig, add this to your $HOME/.tigrc:
bind generic E !git format-patch -1 %(commit)
Start tig, mark the patch you want, hit "E" to get a nice patch file. Doesn't get much simpler than that.
[update Jun 05 2012]
As SEJeff and Michael point out in the comments
git show $shashows a single commit. The output of git show is different to git format-patch though (it cannot be applied via git-am).
Why not use get show?
ReplyDeletegit show $COMMIT_ID
---
Jeff Schroeder
http://www.digitalprognosis.com
You can also simply use
ReplyDeletegit show "commitish"
Because git show's output is very different from git format-patch.
ReplyDeleteThis is great! Thanks.
ReplyDelete`git show --pretty=email $COMMIT_ID` for formatting like format-patch
ReplyDelete