←back to thread

577 points Delgan | 2 comments | | HN request time: 0.419s | source
Show context
oftenwrong ◴[] No.44347165[source]
Another 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.

replies(10): >>44347282 #>>44347522 #>>44347679 #>>44347997 #>>44348063 #>>44348331 #>>44348367 #>>44348438 #>>44351063 #>>44352844 #
1. Ayesh ◴[] No.44352844[source]
TIL the `--trailer` CLI option. I used to edit the commit message in a text editor and manually add the trailers (which works for GitHub `Co-Authored-By`).

being able to use them with `git log` format is pretty cool.

replies(1): >>44352906 #
2. pyuser583 ◴[] No.44352906[source]
I’ve wanted to use them to keep track of whether a change was done by AI.

Lack of support was a big problem.