Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Git Commit Message Template to the Repository #94

Conversation

franziska-wegner
Copy link
Owner

@franziska-wegner franziska-wegner commented Jan 5, 2024

This PR introduces a common commit message template that should be used for this repository. The questions help in identifying major problems with the commit beforehand and help in the aftermath to understand certain decision years after the commit if necessary. The repository dependent .gitconfig needs to be included with git config --local include.path ./.gitconfig to make this work.

The resources of the message are given in [1-5].

The template in [6] appears to me also very useful as well as the description of [7]. The latter describes the usage of multiple templates that are use case dependent, if I understand it correctly.

> vi ~./gitconfig:
	[commit]
        template = ./egoa/.gitmessage

Changes to be committed:

  • new file: .gitmessage
  • new file: .gitconfig

Literature
[1] https://thoughtbot.com/blog/better-commit-messages-with-a-gitmessage-template
[2] https://thoughtbot.com/blog/5-useful-tips-for-a-better-commit-message
[3] https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/creating-a-pull-request-template-for-your-repository
[4] https://www.youtube.com/watch?v=PJjmw9TRB7s
[5] https://www.amazon.com/gp/product/B07MNKZJR9/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=B07MNKZJR9&linkCode=as2&tag=initialcommit-20&linkId=21a8f51af6f217c290a950ce506fba59
[6] https://embeddedartistry.com/blog/2017/08/04/a-github-pull-request-template-for-your-projects/
[7] https://learn.microsoft.com/en-us/azure/devops/repos/git/pull-request-templates?view=azure-devops

Why:
* This helps to have a common commit message structure,
* This also helps to identify problems while writing the answers to these questions.

Changes to be committed:
	new file:   .gitmessage
Copy link

codecov bot commented Jan 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (82370d5) 94.57% compared to head (b167e8f) 94.57%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #94   +/-   ##
=======================================
  Coverage   94.57%   94.57%           
=======================================
  Files          55       55           
  Lines        5050     5050           
=======================================
  Hits         4776     4776           
  Misses        274      274           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

What:
* This file needs to be included by each developer using the local command to have it repository dependent

Use:
* git config --local include.path ./.gitconfig

Changes to be committed:
	new file:   .gitconfig
@franziska-wegner franziska-wegner force-pushed the franziska-wegner/2024/january/git/git-message-for-commits branch from 543276a to 851a3ca Compare January 5, 2024 12:43
@franziska-wegner franziska-wegner added the CI/CD Changes in the CI process label Jan 5, 2024
@franziska-wegner franziska-wegner merged commit 0acf774 into main Jan 5, 2024
17 checks passed
@franziska-wegner franziska-wegner deleted the franziska-wegner/2024/january/git/git-message-for-commits branch January 5, 2024 12:59
github-actions bot added a commit that referenced this pull request Jan 5, 2024
* Add git commit message template to the repository
  * Why:
    * This helps to have a common commit message structure,
    * This also helps to identify problems while writing the answers to these questions.
  * Changes to be committed:
    * new file:   .gitmessage
* Add repository git config that includes the git commit message template
  * What:
    * This file needs to be included by each developer using the local command to have it repository dependent
  * Use:
    * git config --local include.path ./.gitconfig
  * Changes to be committed:
    * new file:   .gitconfig 0acf774
github-actions bot added a commit that referenced this pull request Jan 5, 2024
* Add git commit message template to the repository
  * Why:
    * This helps to have a common commit message structure,
    * This also helps to identify problems while writing the answers to these questions.
  * Changes to be committed:
    * new file:   .gitmessage
* Add repository git config that includes the git commit message template
  * What:
    * This file needs to be included by each developer using the local command to have it repository dependent
  * Use:
    * git config --local include.path ./.gitconfig
  * Changes to be committed:
    * new file:   .gitconfig 0acf774
github-actions bot added a commit that referenced this pull request Jan 5, 2024
* Add git commit message template to the repository
  * Why:
    * This helps to have a common commit message structure,
    * This also helps to identify problems while writing the answers to these questions.
  * Changes to be committed:
    * new file:   .gitmessage
* Add repository git config that includes the git commit message template
  * What:
    * This file needs to be included by each developer using the local command to have it repository dependent
  * Use:
    * git config --local include.path ./.gitconfig
  * Changes to be committed:
    * new file:   .gitconfig 0acf774
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/CD Changes in the CI process documentation Improvements or additions to documentation enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

None yet

1 participant