From 8b396dc3b29857f570d04e26d9f5088e7912b59e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Bobbio=20=28Lunar=29?=
 <jeremy.bobbio@inria.fr>
Date: Wed, 22 Feb 2023 15:40:52 +0000
Subject: [PATCH] Update Git style guide for GitLab

As we have switched from Phabricator to GitLab, we now point at GitLab
documentation on how to automatically link and close issues from
commit messages.

Improvements on the section about commit messages are thrown in for good
measure.

Related to #4732
---
 docs/devel/contributing/git-style-guide.rst | 34 ++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/docs/devel/contributing/git-style-guide.rst b/docs/devel/contributing/git-style-guide.rst
index 3fcac1f5..f81f2545 100644
--- a/docs/devel/contributing/git-style-guide.rst
+++ b/docs/devel/contributing/git-style-guide.rst
@@ -5,29 +5,21 @@ Git style guide
 
 Various information about how we use Git to develop Software Heritage.
 
-Commits
--------
+Commit messages
+---------------
 
-Make your commits adhere to this `How to Write a Git Commit Message <http://chris.beams.io/posts/git-commit/>`_
+Good commit messages are essentials in a project as large as Software Heritage.
+They are crucial to those who will review your changes and important to anyone else
+who will interact with the codebase at a later time. This includes your future self!
 
-Link commits to tasks
-+++++++++++++++++++++
+Make sure to follow the recommandations from `How to write a Git
+commit message <http://chris.beams.io/posts/git-commit/>`_
 
-You can reference Phabricator tasks from your commits,
-using a `dedicated syntax <https://secure.phabricator.com/T5132>`_
-When you do so, please put the task action on a separate line,
-so that it is clearly visible.
+Closing or referencing issues
+-----------------------------
 
-Make sure commits that are enough to close a bug do so using a line like::
+You can reference issues in commit messages (or merge requests). When using the
+right formats, GitLab will automatically link or close related issues:
 
-   Closes T123456
-
-If you just want to "ping" a task, updating it with the fact that
-a related commit has been pushed, use::
-
-   Related to T123456
-
-References
-----------
-
-* `special syntax you can use in commit messages to cause effects <https://secure.phabricator.com/T5132>`_
+- `Crosslinking issues from commit messages <https://docs.gitlab.com/ee/user/project/issues/crosslinking_issues.html#from-commit-messages>`_
+- `Closing issues automatically <https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically>`_
-- 
GitLab