I believe that Git commit messages are a powerful tool for documenting a codebase. One of my favorite Git commits is from my time at the Government Digital Service, working on GOV.UK. The commit, titled “Convert template to US-ASCII to fix error,” was made by a developer named Dan Carley. This commit has a small code change but an informative commit message. Unlike other organizations where commit messages may be vague or unhelpful, Dan took the time to explain the reason for the change in detail. This level of detail is valuable for documentation purposes and can easily be lost over time. Additionally, the commit message is searchable, tells a story about the problem and the process of fixing it, and makes everyone a little smarter by sharing useful tips and commands. Finally, the commit message adds a human touch, building compassion and trust within the team. While this example is extreme, it highlights the importance of good commit messages in explaining the context behind a change and contributing to the collective understanding of the codebase.
https://dhwthompson.com/2019/my-favourite-git-commit