168 | | Mainly based on [http://git-scm.com/book/en/Distributed-Git-Contributing-to-a-Project#Commit-Guidelines git commit guidelines]. |
| 168 | Based on [http://git-scm.com/book/en/Distributed-Git-Contributing-to-a-Project#Commit-Guidelines git commit guidelines] and [http://chris.beams.io/posts/git-commit/ How to Write a Git Commit Message]. |
| 169 | |
| 170 | The short answer on the golden rule for git commit subject lines is to you ask yourself: |
| 171 | '''If applied, this commit will...''' ''<your commit subject line here>''[[br]][[br]] |
| 172 | e.g. If applied, this commit will {{{Enable editing of torrent names in Add Dialog}}} |
| 173 | |
| 174 | A general guideline on writing a good commit message is to provide information |
| 175 | that is not already provided from the commit diff, which in essence is "''the why, not the how''". |
| 176 | |
| 177 | * Explain why the change is necessary |
| 178 | * ''After reading the commit message it should should be apparent why the changes were made.'' |
| 179 | |
| 180 | * Explain how the issue is addressed in broad terms |
| 181 | * ''It is not necessary to explain how the changes are made in detail as that can be seen from the commit diff.'' |
201 | | To differentiate commit changes at a glance, the subject of commits for specific components should be prefixed with relevant tags/labels, such as |
202 | | |
203 | | ''Core'', ''WebUI'', ''GTKUI'', ''Tests'', ''win32'', ''Packaging'', ''Console'', ''Blocklist'' etc. |
204 | | |
205 | | {{{[GTKUI] Make Add Dialog torrent name editable}}} |
| 202 | To differentiate commit changes at a glance, the subject of commits for specific components should be prefixed with relevant tags/labels, such as: |
| 203 | ''Core'', ''WebUI'', ''GTKUI'', ''Tests'', ''Packaging'', ''Console'', ''Blocklist'', ''Lint'' etc. (see git logs for more examples) |
| 204 | |
| 205 | {{{[GTKUI] Enable editing of torrent names in Add Dialog}}} |