41

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.

Benjamin Loison
  • 3,782
  • 4
  • 16
  • 33
MOHAMED
  • 41,599
  • 58
  • 163
  • 268

2 Answers2

84

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
  • 322,767
  • 57
  • 360
  • 340
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