How to specify 'git send-email' to send mail on a specific patch?
I have 4 commits but I haven't done a 'git pull'. When I do 'git send-email', it will send out 4 emails (1 patch for each commit).
How can I configure git send-email so that it can send out email just for the last commit?
Thank you.
git-send-email
takes arguments specifying the patches to send. For example,
git send-email HEAD^
will create a patch for the last commit on your current branch. Similarly if you are formatting patches first with git-am
, you can specify only the single patch file you want to send.
For more information on how to specify revisions, see man git-rev-list
. The common methods you'll probably care about:
<commit1>..<commit2>
means everything after up to <commit>^
means the commit before <commit>
<commit>~5
means the commit five commits before <commit>
The question was asking about a "specific patch", so many may come here to find how to send email for a spefic commit, everywhere in the log history. For this case answer may be:
git send-email -1 b7ed62c8d882fecaf70da813a0494b2f8265d544 -to [email protected]
Where b7ed62c8d882fecaf70da813a0494b2f8265d544 is the commit i want o send as a single [PATCH] whatever is his position in the log history.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With