If I have a commit hash that has not yet been pushed to origin, how can I generate a patch for that commit only. I would like to use git log -p --no-names
but can't see a switch to pass in a specific commit hash. Should I be using a different git command?
For git log patch:
git log -p -1 <commit>
You should be using git format-patch
for patches though:
git format-patch -1 <commit>
http://www.kernel.org/pub/software/scm/git/docs/git-format-patch.html