Skip to content

Commit c7cb6e1

Browse files
committed
Add documentation for DCO compliance
Signed-off-by: copilot-swe-agent[bot] <[email protected]>
1 parent 650a9ab commit c7cb6e1

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

docs/dco-compliance.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# DCO Compliance
2+
3+
This document explains how to ensure your commits comply with the Developer Certificate of Origin (DCO) requirements for this project.
4+
5+
## What is the DCO?
6+
7+
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. See the full text in the [CONTRIBUTING.md](../CONTRIBUTING.md#developer-certificate-of-origin-signing-your-work) file.
8+
9+
## Adding DCO Sign-offs to Commits
10+
11+
All commits must include a `Signed-off-by` line in the commit message. This line certifies that you have the right to submit your contribution under the project's license.
12+
13+
### Using the -s Flag
14+
15+
The simplest way to add a sign-off to your commits is to use the `-s` flag with the `git commit` command:
16+
17+
```sh
18+
git commit -s -m "Your commit message"
19+
```
20+
21+
This will automatically add a `Signed-off-by` line with your name and email to the commit message.
22+
23+
### Configuring Git for Automatic Sign-offs
24+
25+
You can configure Git to automatically add sign-offs to all your commits:
26+
27+
```sh
28+
git config --global commit.signoff true
29+
```
30+
31+
Alternatively, you can create a Git alias for creating signed-off commits:
32+
33+
```sh
34+
git config --global alias.cs 'commit -s'
35+
```
36+
37+
Then use `git cs` instead of `git commit` to create commits with sign-offs.
38+
39+
### Adding Sign-offs to Existing Commits
40+
41+
If you forgot to sign off your commits, you can amend them:
42+
43+
```sh
44+
git commit --amend --no-edit --signoff
45+
```
46+
47+
For multiple commits, you can use git rebase:
48+
49+
```sh
50+
git rebase --signoff HEAD~n
51+
```
52+
53+
Replace `n` with the number of commits you want to sign off.
54+
55+
## Verification
56+
57+
The project uses automated checks to verify that all commits include the required DCO sign-off. If you receive a DCO failure notification, please follow the instructions above to add the required sign-offs.

0 commit comments

Comments
 (0)