With Chef’s new policy to use the DCO signing process, I found
myself googling how to set it up a couple times. Here are my notes on how to
git so you are now in compliance.
I should make it clear that the difference between
are significant but subtle.
signoff doesn’t require the GPG key and is just
the line: “Signed-off by” which is covered in the following quote.
Our DCO process only requires:
Moving forward all commits to Chef-maintained open source software projects must include a “Signed-off-by” line indicating the name and email address of the contributor signing off on the change.
For a detailed description or you can just do the following:
$ git commit -s $ # Or $ git commit --signoff
If you already have the commit, use
git commit --amend or
git rebase -i to
edit your commit message, and add the above signoff line.
If you would like something more permanent, you can add to your
something like the following:
[alias] amend = commit -s --amend cm = commit -s -m commit = commit -s
Or you can do something like Dave Parfitt suggests; which is surprisingly
easy. You can add this to your
~/.gitconfig: (be sure to change your name and email address)
[commit] template = ~/.gitmessage
~$ cat ~/.gitmessage Signed-off-by: Your Name <firstname.lastname@example.org>
If you are attempting to do it in emacs with magit you need to the following:
c - s RET and you’ll notice the
(--signoff) switch become highlighted.