51 questions
3 votes
1 answer
126 views
How to keep git notes through a rewrite (rebase/rename/amend)?
I have added some notes to commits using git notes add <hash> -m potato But when I rebase or amend the commits, the note is not copied over to the new rewritten commit. According to the docs ...
3 votes
1 answer
169 views
git notes in oneline git log format [duplicate]
When running git log to list commits with notes, it seems like the notes end with an extra newline. Example output with two commits where only the second one has a note: $ git log --pretty="%ad %...
2 votes
1 answer
170 views
List all git notes for given object
I am playing around with using git notes to store metadata after a commit gets merged. For example, if a commit causes nightly CI to fail and later gets reverted, I would do: $ commit=123 $ git notes ...
4 votes
3 answers
359 views
How can I sign Git notes?
Git notes are a feature to add meta-information to Git objects. See this Stackoverflow article for further details. Similar to commits, I also want to sign notes. My local Git is configured to sign ...
4 votes
2 answers
1k views
Remove trailing newline from %N format specifier in git-log
Is it possible to easily trim the newline when displaying a note with %N with git log? I would like to include metadata about a commit by adding it with git-notes and viewing it with something like: ...
3 votes
1 answer
579 views
Add tags / label to git commits
I have a branching strategy where I have a branch that represent each of my org. Now when working on a branch , we can have commits for a release or a hotfix correction etc... I want to be able to tag/...
2 votes
1 answer
381 views
git rebase: merge notes into commit message
Given a commit with notes attached, can I take the message in the note and merge it into the commit's message when I do a rebase? The background of this question is that I have a large repository ...
2 votes
2 answers
627 views
How do we exclude `Notes added by 'git notes add'` from `git log`?
How do we exclude Notes added by 'git notes add' from git log? When we run git log --all, there are millions of lines with Notes added by 'git notes add'. We need --all to see everything else. We just ...
1 vote
1 answer
416 views
git sign notes for push to central server
How do I add a note and sign it? Using BitBucket, repo has Verify Commit Signature Reject commits and tags without a verified GPG signature enabled. My build job adds a note to the commit that has ...
4 votes
2 answers
258 views
`git notes append` creates additional blank line
Let's say I have git commit with git note: commit 385f6c188a5b1cef25acb6412ba4acd7c25b0b9c (HEAD -> master) Author: zuku Date: Tue Oct 8 14:14:31 2019 +0200 Test commit Notes: Test ...
2 votes
1 answer
157 views
Git hooks with git notes?
Is it possible to use any git hooks with git notes? In other words, are any git hooks triggered by a git notes add -m "Some note"? I have tried a few hooks (update, post-commit) but so far none ...
1 vote
1 answer
2k views
How can I fetch notes from a remote git repository with TortoiseGit?
A typical use of notes is to supplement a commit message without changing the commit itself. Notes can be shown by git log along with the original commit message (Git-notes documentation). With ...
1 vote
1 answer
126 views
Add note to commit when filtering branch with Git
Next command is to store commit history and files lists but remove file contents in order to minimalize disk space and network traffic consumption when need to get know history of huge repo without ...
7 votes
3 answers
1k views
Find commit with specific git note
I use git notes in my repository. Sometimes I need to find a commit with note that includes given string. So far I was using this command: git log --show-notes=* --grep="PATTERN" --format=format:%H ...
5 votes
4 answers
4k views
How to show remote refs/notes/* with git log
How to show refs/notes in a git log --oneline --graph --all --decorate output for remotes? With the above command I only see my own refs/notes/foobar, but not the remote ref. The docs don't hint any ...