@@ -34,9 +34,9 @@ the quality of the commits and their respective commit messages.
34
34
Git Configuration
35
35
******************
36
36
37
- Since name and e-mail address are part of the commit (and thus be part
38
- of the commit history) they shall be specified via the .gitconfig file.
39
- So this file must at least include the following lines :
37
+ Authors name and e-mail address are part of the commit (and thus be part of the commit history).
38
+ They must match the name and e-mail used for eclipse registration. They can be specified via the
39
+ .gitconfig file:
40
40
41
41
.. code-block ::
42
42
@@ -45,11 +45,10 @@ So this file must at least include the following lines:
45
45
name = Max Mustermann
46
46
47
47
***************
48
- Commit History
48
+ Merging PRs
49
49
***************
50
50
51
- Before merging a PR all commits shall be squashed into few (desired only
52
- one) logical commits. This is done following the rules below.
51
+ When merging a PR via the GitHub user interface:
53
52
54
53
Use ``Squash & Merge `` in case:
55
54
@@ -62,11 +61,8 @@ Use ``Squash & Merge`` in case:
62
61
63
62
Use ``Rebase & Merge `` or ``Merge Commit `` in case:
64
63
65
- #. the commits address different topics
66
-
67
- - Sort by topics and combine each topic to a single commit.
68
- - It is advised that a PR addresses a single/atomic topic.
69
- - Preferred way are separated PRs for separate topics.
64
+ #. the commits address different topics. Note however that it is preferred that a PR addresses a
65
+ single/atomic topic.
70
66
71
67
**OR **
72
68
#. the commits have different authors
@@ -114,38 +110,27 @@ Summary
114
110
115
111
<prefix_name>: Summary
116
112
117
- The Subject shall describe what was changed in a single line max 72
118
- characters long. It shall include a prefix for the module, component or
119
- feature which was changed e.g. "doc:" or "bazel:" It shall start with a
120
- capital letter and should not be ended by a trailing period in the
121
- subject line.
113
+ The Subject shall describe what was changed in a single line max 72 characters long. It shall not
114
+ start or end with whitespace. It shall not end with a period.
122
115
123
116
Good and bad examples for a subject are:
124
117
125
- - **mw: Show colorful output ** not Add file
126
- - **bazel: Test Requirement SWS_CM_00001 ** not Add test
127
- - **osal: Split responsibilities of job handling and execution ** not Refactor code
118
+ - **Show colorful output ** not Add file
119
+ - **Test Requirement SWS_CM_00001 ** not Add test
120
+ - **Split responsibilities of job handling and execution ** not Refactor code
128
121
129
122
Description
130
123
===========
131
124
132
- The description must contain a brief summary of the content of the
133
- commit and why this is necessary. Furthermore it must be consistent and
134
- logically complete.
135
-
136
- If feasible, the commit message body should be extended with quoted
137
- material such as compiler warnings, debugger stack traces or measurement
138
- data for performance optimizations.
139
-
140
- The description may mention issues and link to them. A detailed description
141
- of linking commits to issues is available on `GitHub
142
- <https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue> `__.
143
- Be aware that keywords like (close | fix | resolve) will also close the
144
- referenced issue if the pull request is merged.
125
+ The optional description can be used to provide a brief summary of the content of the
126
+ commit and why this is necessary.
145
127
146
128
Git commits are not required to mention issues. It is sufficient if the PR
147
129
links to any relevant issues.
148
130
131
+ The description may mention issues and link to them. Note that when squashing as described above, a
132
+ link to the PR is automatically added.
133
+
149
134
Footer
150
135
======
151
136
@@ -156,31 +141,25 @@ in the following format:
156
141
157
142
Also-by: Some Bodyelse <[email protected] >
158
143
159
- An additional check is implemented to suppress false positives: if a
160
- commit message has revert/merge in the first line, the linting rules
161
- will not be applied to it. Thereby headaches when performing reverts or
162
- merges are reduced.
163
-
164
144
Layout Summary
165
145
==============
166
146
167
147
In short the commit message shall consist of:
168
148
169
149
- Summary
170
- - Empty line
171
- - Description
172
- - Empty line
173
- - Footer
150
+ - Empty line (required in case description is present)
151
+ - Description (optional)
152
+ - Empty line (required if footer is present)
153
+ - Footer (optional)
174
154
175
155
Example
176
156
=======
177
157
.. code-block ::
178
158
179
- component: Short one line summary of change
159
+ Short one line summary of change
180
160
181
- More detailed explanatory text, mandatory. Wrap it to about 72
182
- characters or less. The first line is treated as the subject and the
183
- rest of the text as the body. The blank line separating the summary from
161
+ More detailed explanatory text, optional. Wrap it to about 72
162
+ characters or less. The blank line separating the summary from
184
163
the body is critical (unless you omit the body entirely);
185
164
186
165
- Bullet points are okay, too
0 commit comments