Skip to content

Commit dfb5a09

Browse files
authored
chore: add dco config and CONTRIBUTING.md (#583)
1 parent d40f94a commit dfb5a09

File tree

2 files changed

+84
-0
lines changed

2 files changed

+84
-0
lines changed

.github/dco.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
require:
2+
members: false

CONTRIBUTING.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
## Developer Certificate of Origin (DCO)
2+
3+
To ensure that contributions are properly licensed and that the project has the right to distribute them, this project requires that all contributions adhere to the Developer Certificate of Origin (DCO).
4+
5+
### What is the DCO?
6+
7+
The 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. It is a simple statement asserting your rights to contribute the code.
8+
9+
### How to Comply with the DCO
10+
11+
Compliance is straightforward. When you contribute code, you simply need to "sign off" on your commits. You do this by adding a `Signed-off-by` line to your Git commit messages:
12+
13+
Signed-off-by: Your Real Name [email protected]
14+
**Using the `-s` flag with `git commit`**
15+
16+
The easiest way to do this is to use the `-s` or `--signoff` flag when making your commit:
17+
18+
```bash
19+
git commit -s -m "Your descriptive commit message here"
20+
```
21+
This automatically appends the Signed-off-by line to your commit message using the name and email address configured in your local Git settings. Ensure your Git `user.name` and `user.email` are set correctly to your real name and a valid email address.
22+
23+
### What does "Signing Off" mean?
24+
25+
By adding the Signed-off-by line, you are certifying to the following (from [developercertificate.org](https://developercertificate.org/)):
26+
27+
> Developer Certificate of Origin
28+
> Version 1.1
29+
>
30+
> Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
31+
>
32+
> Everyone is permitted to copy and distribute verbatim copies of this
33+
> license document, but changing it is not allowed.
34+
>
35+
>
36+
> Developer's Certificate of Origin 1.1
37+
>
38+
> By making a contribution to this project, I certify that:
39+
>
40+
> (a) The contribution was created in whole or in part by me and I
41+
> have the right to submit it under the open source license
42+
> indicated in the file; or
43+
>
44+
> (b) The contribution is based upon previous work that, to the best
45+
> of my knowledge, is covered under an appropriate open source
46+
> license and I have the right under that license to submit that
47+
> work with modifications, whether created in whole or in part
48+
> by me, under the same open source license (unless I am
49+
> permitted to submit under a different license), as indicated
50+
> in the file; or
51+
>
52+
> (c) The contribution was provided directly to me by some other
53+
> person who certified (a), (b) or (c) and I have not modified
54+
> it.
55+
>
56+
> (d) I understand and agree that this project and the contribution
57+
> are public and that a record of the contribution (including all
58+
> personal information I submit with it, including my sign-off) is
59+
> maintained indefinitely and may be redistributed consistent with
60+
> this project or the open source license(s) involved.
61+
62+
### Using Your Real Name
63+
64+
Please use your real name (not a pseudonym or anonymous contributions) in the Signed-off-by line.
65+
66+
### What if I forgot to sign off my commits?
67+
68+
If you have already made commits without signing off, you can amend your previous commits:
69+
70+
For the most recent commit:
71+
```bash
72+
git commit --amend -s
73+
```
74+
If you need to update the commit message as well, you can omit the -m flag and edit it in your editor.
75+
76+
For older commits: You will need to use interactive rebase:
77+
```bash
78+
git rebase -i --signoff HEAD~N # Replace N with the number of commits to rebase
79+
```
80+
Follow the instructions during the interactive rebase. You might need to force-push (git push --force-with-lease) your changes if you've already pushed the branch. Be careful when force-pushing, especially on shared branches.
81+
82+
We appreciate your contributions and your adherence to this process ensures the legal integrity of the project for everyone involved. If you have any questions about the DCO, please don't hesitate to ask.

0 commit comments

Comments
 (0)