RRP
RRP

Reputation: 2853

Git patch create and send it to an email

I just created a patch using the following command git format-patch master --stdout > raj_powar.patch

In order to send the 'raj_powar.patch', i ran the following command git send-email --subject="stringval" --to="address" raj_powar.patch

But i keep getting the error "No subject line in raj_powar.patch ? at /Library/Developer/CommandLineTools/usr/libexec/git-core/git-send-email "

What am i doing wrong, how do i email this patch?

Upvotes: 0

Views: 190

Answers (1)

Michael Barker
Michael Barker

Reputation: 124

Your format-patch command didn't specify a range of commits, so likely your patch file is empty. If you just want a patch for the top commit on master, you can use "-1" or use "master^..master".

Use git format-patch -1 master --stdout > raj_powar.patch instead.

Upvotes: 0

Related Questions