news.volyx.in

My Favourite Git Commit (fatbusinessman.com)

1313 points by robin_reala · 2555 days ago · 370 comments on HN

Article summary

The article discusses the importance of well-crafted Git commit messages, using a specific example from the author's experience at the Government Digital Service. The commit message in question provides detailed context for a code change, making it easier for others to understand the reasoning behind the change. The author argues that good commit messages can help document a codebase, make it easier to search for information, and even spread knowledge around a team. The article highlights the benefits of including detailed information in commit messages, rather than relying solely on issue trackers or other external tools.

Main themes

  • Git commit messages
  • code documentation
  • issue tracking
  • version control systems
  • encoding and character sets
  • project management
  • knowledge sharing

What commenters say

  • Some argue that detailed information about code changes should be stored in issue trackers, rather than commit messages, to provide a single source of truth for project information.
  • Others believe that commit messages are a better place for this information, as they are more closely tied to the code itself and can be easily searched and referenced.
  • There is disagreement about the level of detail that should be included in commit messages, with some arguing that they should be concise and to the point, while others believe that more detailed information can be helpful.
  • Some commenters suggest that using a version control system that integrates issue tracking, such as Fossil, can help to resolve the debate about where to store information about code changes.
  • The use of non-ASCII characters in codebases is also discussed, with some arguing that they should be forbidden due to potential encoding issues, while others believe that they can be useful and are supported by some programming languages.
  • The importance of planning for the potential loss or migration of issue tracking systems is also highlighted, with some arguing that commit messages can provide a more durable record of project history.
  • Some commenters believe that commit messages should focus on providing a brief summary of changes, with more detailed information stored in external tools or documentation.
  • Others argue that commit messages can be a valuable tool for spreading knowledge and providing context for code changes, and that they should be used to their full potential.