Is git notes the intended way to add category-style information to a commit?
The answer to Can I add metadata to git commits? Or can I hide some tags in gitk mentions git notes as a way to add metadata to a git commit.
Is git notes, possibly taking advantage of its namespace functionality in case I want to add other types of notes, the best way to categorize commits? For example, I’d like to categorize commits into “refactoring”, “change-functionality”, “bug-fix”, “bug-introduce”, and be able to ask git to only list commits that are in certain categories.
One Solution collect form web for “Is git notes the intended way to add category-style information to a commit?”
What you are proposing is quite similar to what the ruby-based gem “step-up” is doing, based on
The great goal of this Gem is giving to developers an easy way to manage these notes.
With a culture of notating all the relevant developments, its possible to retrieve a summary of a range of versions besides that specifying what kind of information will be retrieved.
For example, imagine that you want to see all the features implemented in your application since the version v1.10.1 up to v2.0.0
stepup notes --since v1.10.1 upto v2.0.0 --sections pre_deploy pos_deploy
The result would be something like the following:
Showing notes since v1.10.1 up to v2.0.0 (including notes of tags: v1.10.1, v1.10.2, v1.51.0, v2.0.0) --- Pre-Deploy: - dependency of version v10 of project XYZ - it needed to rename the following file - config/environment_variables.yml.sample -> config/environment_variables.yml - rake articles:index Pos-Deploy: - Reindex articles - rake articles:index - rake db:seed - rake categories:reload
ranged_notes.rb will define functions to get all the relevant commits, based on their notes.
git.rb contains the actual
git notes commands.