๐ #Git Notes: Lesser-known feature to add info to commits without changing them
๐ #Symfony uses Git Notes to store #GitHub pull request discussions
๐๏ธ Stores PR comments in "github-comments" reference using #GitHub API
๐ Allows offline viewing and preservation of discussion history
๐ ๏ธ Implemented via internal CLI tool for merging contributions
๐ป Useful for maintaining context when switching platforms or finding old discussions
#VersionControl #OpenSource #SoftwareDevelopment #CodeReview
Git Notes provide a way to attach additional information to commits without altering the commit itself. This feature can be used to store important metadata, such as code review comments, directly with the code. Symfony's implementation demonstrates a practical use case for preserving GitHub discussions alongside the codebase.
Store Code Discussions in Git using Git Notes
Code discussions contain relevant information. Isnโt it a shame that we keep these in the centralized GitHub/GitLab servers, far away from our decentralized Git code? As soon as we move provider, weโll lose all old discussions! And how do you ever find the pull requests back from 5 years ago? Symfony has implemented a lightweight solution to this problem years ago using a less-known feature of Git: Git Notes.
๐