Venus Venus - 11 months ago 109
Git Question

git add Signed-off-by line using format.signoff not working

My client git version is 1.7.0.4.

I want to automatically add a "Signed-off-by" line for the committer at the end of the commit log message when commit a message.


  1. When I set
    git config --global format.signoff true
    , and run
    git commit -m "modify something"
    , I see no "Signed-off-by" in
    git log
    .

  2. If I use
    git commit -m -s "modify something"
    , then "Signed-off-by" does show in
    git log
    .



Can anyone help?

Answer Source

format.signoff is about patch (as illustrated, for instance, in this patch):

format.signoff

A boolean value which lets you enable the -s/--signoff option of format-patch by default

It has no bearing on git commit -s.

In other words, you don't have to signoff every commit, but when you are publishing them as patch for others to use (as in "git: submitting patches"), then you should sign them.

For the exact signification of Signed-of-by, see "What is the Sign Off feature in Git for?".

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download