From 10a87cddabae1e39d33f3f41e98a614cbbd25963 Mon Sep 17 00:00:00 2001 From: Dan Schaper Date: Wed, 3 Jan 2018 15:59:16 -0800 Subject: [PATCH] DCO Failure Text --- Contributing-to-the-project.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Contributing-to-the-project.md b/Contributing-to-the-project.md index 6c4b7bb..8bfb8a3 100644 --- a/Contributing-to-the-project.md +++ b/Contributing-to-the-project.md @@ -1,8 +1,7 @@ -Pi-hole enforces the [Developer Certificate of Origin](https://developercertificate.org/) (DCO) on Pull Requests. It requires all commit messages to contain the `Signed-off-by` line with an email address that matches the commit author. +Pi-hole enforces the [Developer Certificate of Origin](https://developercertificate.org/) (DCO) on Pull Requests. It requires all commit messages to contain the `Signed-off-by` line with an email address that matches the commit author and the name on your GitHub account. The Developer Certificate of Origin (DCO) is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project. Here is the full [text of the DCO](https://developercertificate.org/), reformatted for readability: - > > By making a contribution to this project, I certify that: > @@ -21,6 +20,7 @@ This is my commit message Signed-off-by: Random J Developer ``` + [[How To Signoff]] Git even has a `-s` command line option to append this automatically to your commit message: @@ -35,3 +35,15 @@ and push them to GitHub `$ git commit --amend --signoff` ![DCO Failed PR](https://cloud.githubusercontent.com/assets/173/24482273/a35dc23e-14b5-11e7-9371-fd241873e2c3.png) + +[[ DCO Failures ]] + +If your Pull Request fails the DCO check, it's necessary to fix the entire commit history in the PR. Although this is a situation we'd like to avoid the best practice is to squash the commit history to a single commit, append the DCO sign-off as described [[above|How to amend a Signoff]] or interactively in the rebase comment editing process, and force push. For example, if you have 2 commits in your history (each `^` steps back one commit in the history): + +``` +git rebase -i HEAD^^ +(interactive squash + DCO append) +git push origin -f +``` + +Note, that in general rewriting history in this way is something that can cause issues with the review process and this should only be done to correct a DCO mistake. \ No newline at end of file