What happens of you rebase a branch containing commits with notes attached?
Git Notes: Git's coolest, most unloved feature (2022)
41–50 of 147 posts
Re: Git Notes: Git's coolest, most unloved feature (2022)
#42Earlier quoted context omitted.
One more similar feature from a different system: PostgreSQL COMMENT https://www.postgresql.org/docs/17/sql-comment.html This allows you to attach text to various database objects in PostgreSQL. I wish PostgreSQL had a feature that was more like structured key-value database object metadata that could be edited.
I love PostgreSQL COMMENT. I built a prototype app for a buddy with Supabase and added a COMMENT to every table.
Re: Git Notes: Git's coolest, most unloved feature (2022)
#43In practice I get a lot of value out of referencing commit hashes. If I fix a problem I introduced in a previous commit (for example, commit bumped version, and I forgot to bump it somewhere), my fix will say "amends ab12cd34". That way when I need to cherry-pick that commit, or do something similar (bump again), I can search for the hash of the commit I'm looking at to find what might be missing. UI is worse than gi…
Re: Git Notes: Git's coolest, most unloved feature (2022)
#44Re: Git Notes: Git's coolest, most unloved feature (2022)
#45i use git notes pretty heavily in my current role. started as an experiment to keep track of internal code reviews without flooding the commit message or making PRs for everything. i tag every commit with context what tickets it maps to, infra constraints, links to incident threads if it's a fix. all lives in the repo. this avoids the need to grep slack or jira just to know why a line changed. nce you start using it…
Re: Git Notes: Git's coolest, most unloved feature (2022)
#46Re: Git Notes: Git's coolest, most unloved feature (2022)
#47Re: Git Notes: Git's coolest, most unloved feature (2022)
#48i use git notes pretty heavily in my current role. started as an experiment to keep track of internal code reviews without flooding the commit message or making PRs for everything. i tag every commit with context what tickets it maps to, infra constraints, links to incident threads if it's a fix. all lives in the repo. this avoids the need to grep slack or jira just to know why a line changed. nce you start using it…
Shouldn’t that be the commit message ? Or is the goal to also link forward in time, such as “we realised this commit introduced bug #123” ?
Re: Git Notes: Git's coolest, most unloved feature (2022)
#49There are many "Git's coolest, most unloved feature", e.g.: bisect, pickaxe, reflog, range-diff, archive, annotated tags, etc. Sadly they are often forgotten as many people thing of Git only as a glorified Google Drive...
I think that's fine. Unix philosophy is to focus on one thing and do that well.
Re: Git Notes: Git's coolest, most unloved feature (2022)
#50Another little-known feature is git trailers: https://alchemists.io/articles/git_trailers These are key-value structures data that can be included on a commit when it is created. These are used by some systems for attaching metadata. For example, Gerrit uses this for attaching its Change-Id.
I'm a big fan of conventional commits, and trailers seem like a better way of adding such metadata.
Is adding them manually to the commit message functionally equivalent to using the `--trailer` flag?