diff --git a/.git-commit-template b/.git-commit-template new file mode 100644 index 0000000000000..e51bd8b3dedd5 --- /dev/null +++ b/.git-commit-template @@ -0,0 +1,17 @@ +# Commit summary: Written in the present imperative mood. +# Prefixed by a [scope] tag, not exceeding 50 characters (excl. scope tag). +# # <- 50 chars is here. +[scope] Add/fix/improve/... X + +# Commit message: Describe the 'why' behind the change. Wrap at 72 characters. +# # <- 72 chars is here. + + +# In case the commit fixes a specific issue, uncomment and add the issue ID: +# Fixes https://github.com/root-project/root/issues/ISSUE_ID + +# Tell git to use this commit template by adding it to the repository configuration: +# git config commit.template .git-commit-template + +# See https://github.com/root-project/root/blob/master/CONTRIBUTING.md for more +# information on how to contribute to ROOT. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5c8d64b6595c9..acc522c43e7e5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -56,6 +56,14 @@ It should describe the **why**, rather than the **what** and **how** (we can gat change diff, respectively). The commit message should be wrapped at 72 characters. +> [!TIP] +> We provide a commit message template to help with following the above guidelines. It can be found in the root of this +> repository as [`.git-commit-template`](https://github.com/root-project/root/blob/master/.git-commit-template), +> and can be set to automatically be used for every commit with the following command: +> ```sh +> $ git config commit.template .git-commit-template +> ``` + ## Your Pull Request > [!NOTE]