4

My company is using a private GitLab. I recently looked to the graph of branches and commits, and it showed this. A [1 note] label that looks like the labels GitLab uses to show the branches' heads (but "1 note" isn't one of our branches).

(Screenshot of GitLab commit graph)

When I browse through a CLI git log, I can't see anything related to that.

Does anyone know what this [1 note] means/represent ?

If context can help, here's what the dev did:

Looking at the commit tree:

  • Was on the bottom red commit
  • Made the 2 green commits
  • Made a reset --hard to the bottom red commit
  • Made the middle red commit ([bugfix]...)
  • Pulled the top green commit into its current commit (still middle red one), leading to a merge : the top red commit.
grawity
  • 501,077
Motiss
  • 101

2 Answers2

6

So I just found the origin of this label.

The commit has this label, because another commit has a comment looking like "blablabla ... id_of_the_famous_labeled_commit ... blablabla"

It seems that GitLab recognises that this is a commit's id, and link them.

Motiss
  • 101
0

git notes is a way to attach information to Git objects (primarily commits) after they've been created. Since objects are immutable, the notes are stored in a separate ref (kind of a special branch).

To enable fetching notes from a remote, use:

git config --add remote.origin.fetch "+refs/notes/*:refs/notes/*"
git fetch origin

git ls-remote origin | grep refs/notes
git ls-remote . | grep refs/notes

To display commit-related notes in git log, use:

git config notes.displayRef refs/notes/commits
grawity
  • 501,077