37

I'm generating a git patch. And then I want to send it to the project maintainer.

I want to mark my Name and my email address as signed-off-by in the git patch

How to do it ? in order that the project maintainer get the signed-off-by field with my name and email address.

0 _
  • 9,294
  • 10
  • 71
  • 105
MOHAMED
  • 38,769
  • 51
  • 148
  • 252

2 Answers2

80

When you commit, just use:

git commit -s

or

git commit --signoff

Or you can just write at the end of the commit message, on a line by itself separated by a blank line from the body of the commit:

Signed-off-by: Your Name <your.email@example.com>

If you already have the commit, use git commit -s --amend to add the above signoff line.

Or, if you are going to be sending this as a patch or patch series, you can use git format-patch -s or --signoff to add the signoff to the patch itself, without modifying the commit.

Community
  • 1
  • 1
Brian Campbell
  • 306,970
  • 56
  • 356
  • 335
2

use git commit -s --amend for amending with the last commit or use git commit -s to current ongoing commit. It will add Signed-off-by: YourGitConfigName <YourGitConfigEmail> ad the end of the commit message.

Shanu Dey
  • 91
  • 1
  • 3