blob: 9a8cd9a3261a7759ea1df9c2653321ff1d8151a3 [file] [log] [blame] [view]
lowRISC Contributors802543a2019-08-31 12:12:56 +01001# Contributing code to the opentitan repository
2
Alex Bradburydb9c2712019-11-01 04:04:00 +00003## Contributor License Agreement
4
5Contributions to OpenTitan must be accompanied by sign-off text that indicates
6acceptance of the Contributor License Agreement (see [CLA](CLA) for full
7text), which is closely derived from the Apache Individual Contributor License
8Agreement. The sign-off text must be included once per commit, in the commit
9message. The sign-off can be automatically inserted using a command such as
10`git commit -s`, which will generate the text in the form:
Adam H. Leventhald019b9d2020-01-15 19:59:12 -080011`Signed-off-by: Random J Developer <random@developer.example.org>`
Alex Bradburydb9c2712019-11-01 04:04:00 +000012
13By adding this sign-off, you are certifying:
14
15_By signing-off on this submission, I agree to be bound by the terms of the
16Contributor License Agreement located at the root of the project repository,
17and I agree that this submission constitutes a "Contribution" under that
18Agreement._
19
20Please note that this project and any contributions to it are public and that
21a record of all contributions (including any personal information submitted
22with it, including a sign-off) is maintained indefinitely and may be
23redistributed consistent with this project or the open source license(s)
24involved.
25
lowRISC Contributors802543a2019-08-31 12:12:56 +010026## Quick guidelines
27
28* Keep a clean commit history. This means no merge commits, and no long series
29 of "fixup" patches (rebase or squash as appropriate). Structure work as a
30 series of logically ordered, atomic patches. `git rebase -i` is your friend.
31* Changes should be made via pull request, with review. Do not commit until
32 you've had an explicit "looks good to me". We don't yet have, but plan to
33 create a policy describing code owners and the like. In the meantime use your
34 best judgement. If you're submitting a change against something that was 90%
35 authored by a single person, you'll want to get their ACK before committing.
36* When changes are restricted to a specific area, you are recommended to add a
37 tag to the beginning of the first line of the commit message in square
38 brackets. e.g. "[UART] Fix bug #157".
39* Code review is not design review and doesn't remove the need for discussing
40 implementation options. If you would like to make a large-scale change or
41 discuss multiple implementation options, discuss on the mailing list.
42* Create pull requests from a fork rather than making new branches in
43 `github.com/lowrisc/opentitan`.
44* Do not force push.
45* Do not attempt to commit code with a non-Apache license without discussing
46 first.
47* If a relevant bug or tracking issue exists, reference it in the pull request
48 and commits.