forked from tangled.org/core
this repo has no description

docs: add DCO info and tips on signing-off commits

Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.sh>

anirudh.fi 2c6865cb afbdb8b2

verified
Changed files
+54
docs
+54
docs/contributing.md
··· 77 77 78 78 We'll use the issue thread to discuss and refine the idea before moving 79 79 forward. 80 + 81 + ## developer certificate of origin (DCO) 82 + 83 + We require all contributors to certify that they have the right to 84 + submit the code they're contributing. To do this, we follow the 85 + [Developer Certificate of Origin 86 + (DCO)](https://developercertificate.org/). 87 + 88 + By signing your commits, you're stating that the contribution is your 89 + own work, or that you have the right to submit it under the project's 90 + license. This helps us keep things clean and legally sound. 91 + 92 + To sign your commit, just add the `-s` flag when committing: 93 + 94 + ```sh 95 + git commit -s -m "your commit message" 96 + ``` 97 + 98 + This appends a line like: 99 + 100 + ``` 101 + Signed-off-by: Your Name <your.email@example.com> 102 + ``` 103 + 104 + We won't merge commits if they aren't signed off. If you forget, you can 105 + amend the last commit like this: 106 + 107 + ```sh 108 + git commit --amend -s 109 + ``` 110 + 111 + If you're submitting a PR with multiple commits, make sure each one is 112 + signed. 113 + 114 + For [jj](https://jj-vcs.github.io/jj/latest/) users, you can add this to 115 + your jj config: 116 + 117 + ``` 118 + ui.should-sign-off = true 119 + ``` 120 + 121 + and to your `templates.draft_commit_description`, add the following `if` 122 + block: 123 + 124 + ``` 125 + if( 126 + config("ui.should-sign-off").as_boolean() && !description.contains("Signed-off-by: " ++ author.name()), 127 + "\nSigned-off-by: " ++ author.name() ++ " <" ++ author.email() ++ ">", 128 + ), 129 + ``` 130 + 131 + Refer to the [jj 132 + documentation](https://jj-vcs.github.io/jj/latest/config/#default-description) 133 + for more information.