使用git Notes的多个分支

问题描述 投票:0回答:1

我希望使用

git notes
来存储提交的基准测试数据,以便我可以维护项目性能的历史记录。

我知道我可以使用

git notes
将元数据附加到提交,但我想将基准测试数据存储在
refs/notes/commits
之外的单独分支中,例如
refs/notes/benchmarks
,但我不知道该怎么做关于这个。

是否可以以这种方式使用

git notes
,以便我可以拥有引用
master
中提交的多个注释分支?

git git-notes
1个回答
5
投票

就像这样:

git notes --ref refs/notes/benchmarks add [ -m 'msg' ]

然后您可以在

git log

中查看您的笔记
git log --notes=refs/notes/benchmarks

或读取特定对象的注释内容(例如提交 - 但注释也可以注释其他类型的对象,例如提交的树)

git notes --ref refs/notes/benchmarks show <commit>
© www.soinside.com 2019 - 2024. All rights reserved.