36e21f4d7729481f0b4bf64723fbb1b45360f387
[AGL/documentation.git] / docs / 5_How_To_Contribute / 4_Submitting_Changes.md
1 ---
2 title: Submitting Changes
3 ---
4
5 Carefully review the following before submitting a change. These
6 guidelines apply to developers that are new to open source, as well as
7 to experienced open source developers.
8
9 ## Change Requirements
10
11
12 This section contains guidelines for submitting code changes for review.
13 For more information on how to submit a change using Gerrit, please see
14 [Working with Gerrit](./3_Working_with_Gerrit.md).
15
16 Changes are submitted as Git commits. Each commit must contain:
17
18 -  a short and descriptive subject line that is 72 characters or fewer,
19    followed by a blank line.
20 -  a change description with your logic or reasoning for the changes,
21    followed by a blank line
22 -  a Signed-off-by line, followed by a colon (Signed-off-by:)
23 -  a Change-Id identifier line, followed by a colon (Change-Id:). Gerrit
24    won't accept patches without this identifier.
25
26 A commit with the above details is considered well-formed.
27 [This page](https://chris.beams.io/posts/git-commit/) is a very useful for the
28 same.
29
30 All changes and topics sent to Gerrit must be well-formed.
31 Informationally, ``commit messages`` must include:
32
33 -  **what** the change does,
34 -  **why** you chose that approach, and
35 -  **how** you know it works -- for example, which tests you ran.
36
37 For example: One commit fixes whitespace issues, another renames a
38 function and a third one changes the code's functionality. An example
39 commit file is illustrated below in detail:
40
41 ```sh
42
43 A short description of your change with no period at the end
44
45 You can add more details here in several paragraphs, but please keep each line
46 width less than 80 characters. A bug fix should include the issue number.
47
48 Bug-AGL: [SPEC-<JIRA-ID>]
49 Change-Id: IF7b6ac513b2eca5f2bab9728ebd8b7e504d3cebe1
50 Signed-off-by: Your Name <commit-sender@email.address>
51 ```
52
53 Include the issue ID in the one line description of your commit message for
54 readability. Gerrit will link issue IDs automatically to the corresponding
55 entry in Jira.
56
57 Each commit must also contain the following line at the bottom of the commit
58 message:
59
60 ```sh
61 Signed-off-by: Your Name <your@email.address>
62 ```
63
64 The name in the Signed-off-by line and your email must match the change
65 authorship information. Make sure your :file:``.git/config`` is set up
66 correctly. Always submit the full set of changes via Gerrit.
67
68 When a change is included in the set to enable other changes, but it
69 will not be part of the final set, please let the reviewers know this.