From 93dbaee5ae5ac6b90f9c8169482fae7991023f6f Mon Sep 17 00:00:00 2001 From: Athanasius Date: Mon, 7 Jun 2021 12:26:01 +0100 Subject: [PATCH] Contributing: "Git commit conventions" after "General workflow" Also linkified to the GitHub docs about 'Closes #XXX' and the like. --- Contributing.md | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/Contributing.md b/Contributing.md index ee1573bf..19da9e15 100644 --- a/Contributing.md +++ b/Contributing.md @@ -45,6 +45,20 @@ and another for the Pull Request, merging or cherry-picking commits as needed. --- +## Git commit conventions + +* Please use the standard Git convention of a short title in the first line and fuller body text in subsequent lines. +* Please reference issue numbers using the "hashtag" format #123 in your commit message wherever possible. + This lets GitHub create two-way hyperlinks between the issue report and the commit. + [Certain text](https://docs.github.com/en/issues/tracking-your-work-with-issues/creating-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword) + in a PR that fixes an issue can auto-close the issue when the PR is merged. + Note the caveats about the extended forms being necessary in some situations. +* If in doubt, lean towards many small commits. This makes git bisect much more useful. +* Please try at all costs to avoid a "mixed-up" commit, i.e. one that addresses more than one issue at once. + One thing at a time is best. + +--- + ## Git branch structure and tag conventions Somewhat based on git-flow, but our particular take on it: @@ -409,18 +423,6 @@ Additionally, if your hack is over around 5 lines, please include a `# HACK END` --- -## Git commit conventions - -* Please use the standard Git convention of a short title in the first line and fuller body text in subsequent lines. -* Please reference issue numbers using the "hashtag" format #123 in your commit message wherever possible. - This lets GitHub create two-way hyperlinks between the issue report and the commit. - Certain text in a PR that fixes an issue can auto-close the issue when the PR is merged. -* If in doubt, lean towards many small commits. This makes git bisect much more useful. -* Please try at all costs to avoid a "mixed-up" commit, i.e. one that addresses more than one issue at once. - One thing at a time is best. - ---- - ## Build process See [Releasing.md](docs/Releasing.md) for the environment and procedure necessary for building the application into