git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Git Commit Notes (fetching/pushing)

From
Brooke Kuhlmann <brooke@alchemists.io>
Date
Aug 6, 2023, 18:35 UTC
Message-ID
<D01976C3-4B91-464B-ACF0-78DFFB066747@alchemists.io>
I'm noticing issues with GitHub and GitLab when fetching and pushing commit notes and wanted to know if there is a correct way to configure my Git configuration for working with these servers (or maybe notes aren't supported at al)?
Here's my configuration:
```
[notes]
  rewriteRef = refs/notes/commits
[remote "origin"]
  fetch = +refs/notes/*:refs/notes/*
  push = +refs/notes/*:refs/notes/*
```
Upon creating a note (i.e. `git notes add`) and then pushing changes to the remote, I'll see the following response from GitHub:
``` 
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Delta compression using up to 8 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 289 bytes | 289.00 KiB/s, done.
Total 2 (delta 1), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
To https://github.com/bkuhlmann/test
   5811bd44c32b..0f2422597c5d  refs/notes/commits -> refs/notes/commits
```
Only problem is the notes are not pushed. In fact, the feature branch I'm working is never updated. Only when removing my `[remote "origin"]` Git configuration does the GitHub server work properly (i.e. my changes are pushed to the remote server...but without any notes). Strangely, in all cases GitHub answers back with a success message even though that is incorrect.
Anyway, if anyone has advice or additional information how this should work (or if my configuration is wrong), I'd be grateful. 🙇🏻‍♂️
Next: Taylor Blau
Message 1 of 7 in “Git Commit Notes (fetching/pushing)”
  1. Brooke KuhlmannAug 6, 2023
  2. Taylor BlauAug 6, 2023
  3. Brooke KuhlmannAug 6, 2023
  4. Junio C HamanoAug 7, 2023
  5. Brooke KuhlmannAug 7, 2023
  6. Junio C HamanoAug 7, 2023
  7. Brooke KuhlmannAug 7, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.