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).
5 comments:
Why not use get show?
git show $COMMIT_ID
---
Jeff Schroeder
http://www.digitalprognosis.com
You can also simply use
git show "commitish"
Because git show's output is very different from git format-patch.
This is great! Thanks.
`git show --pretty=email $COMMIT_ID` for formatting like format-patch
Post a Comment