From aa11ddcdbc6d012799424546aefbd698022e3272 Mon Sep 17 00:00:00 2001 From: Emily Bourke Date: Thu, 13 Mar 2025 15:49:13 +0000 Subject: [PATCH 1/2] Clarify blank lines requirement for Co-authored-by MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit At the moment, these docs suggests that two blank lines are needed before the Co-authored-by trailers for github to recognise the declared co-authors. This is (now?) incorrect, as can be seen in [this commit](https://github.com/guardian/amigo/commit/84df33440545401a4737e7584cb4e64855c693ae), which only leaves one blank line but does display the two co-authors in the UI. This commit updates the docs to make it clearer that only one blank line is required. (I have been using `git commit --cleanup=verbatim` completely unnecessarily!) I’ve also added the missing leading `>` symbols before the trailers when writing the message in the shell (they’re added by bash and possibly others to indicate it’s a continuation line). --- .../creating-a-commit-with-multiple-authors.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/content/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors.md b/content/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors.md index e09bb826870a..39152c7f19bc 100644 --- a/content/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors.md +++ b/content/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors.md @@ -36,7 +36,7 @@ You can use {% data variables.product.prodname_desktop %} to create a commit wit {% data reusables.pull_requests.collect-co-author-commit-git-config-info %} -1. Type your commit message and a short, meaningful description of your changes. After your commit description, instead of a closing quotation, add two empty lines. +1. Type your commit message and a short, meaningful description of your changes. After your commit description, instead of a closing quotation, add an empty line. ```shell $ git commit -m "Refactor usability tests. @@ -45,7 +45,7 @@ You can use {% data variables.product.prodname_desktop %} to create a commit wit ``` > [!TIP] - > If you're using a text editor on the command line to type your commit message, ensure there are two newlines between the end of your commit description and the `Co-authored-by:` commit trailer. + > If you're using a text editor on the command line to type your commit message, ensure there is a blank line (i.e., two consecutive newlines) between the end of your commit description and the `Co-authored-by:` commit trailer. 1. On the next line of the commit message, type `Co-authored-by: name ` with specific information for each co-author. After the co-author information, add a closing quotation mark. @@ -54,9 +54,8 @@ You can use {% data variables.product.prodname_desktop %} to create a commit wit ```shell $ git commit -m "Refactor usability tests. > - > - Co-authored-by: NAME - Co-authored-by: ANOTHER-NAME " + > Co-authored-by: NAME + > Co-authored-by: ANOTHER-NAME " ``` The new commit and message will appear on {% data variables.location.product_location %} the next time you push. For more information, see [AUTOTITLE](/get-started/using-git/pushing-commits-to-a-remote-repository). From 3a10bfc1a3b515af8b585031c7a6e4ec8cef5528 Mon Sep 17 00:00:00 2001 From: Ben Ahmady <32935794+subatoi@users.noreply.github.com> Date: Fri, 14 Mar 2025 11:45:16 +0000 Subject: [PATCH 2/2] Update content/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors.md --- .../creating-a-commit-with-multiple-authors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors.md b/content/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors.md index 39152c7f19bc..284cf71e49d7 100644 --- a/content/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors.md +++ b/content/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors.md @@ -45,7 +45,7 @@ You can use {% data variables.product.prodname_desktop %} to create a commit wit ``` > [!TIP] - > If you're using a text editor on the command line to type your commit message, ensure there is a blank line (i.e., two consecutive newlines) between the end of your commit description and the `Co-authored-by:` commit trailer. + > If you're using a text editor on the command line to type your commit message, ensure there is a blank line (two consecutive newlines) between the end of your commit description and the `Co-authored-by:` commit trailer. 1. On the next line of the commit message, type `Co-authored-by: name ` with specific information for each co-author. After the co-author information, add a closing quotation mark.