git:如何将 git notes 添加的消息推送到中央 git 服务器?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18268986/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 08:54:53  来源:igfitidea点击:

git: how to push messages added by git notes to the central git server?

git

提问by Iowa

it seems like there is no proper documentation regarding git notes. I have added some notes to one of the commit using git notes add command. but when i push the commit, and later do a separate clone, i dont see the note message there. Is there a way to push all the note messages added via git notes command?

似乎没有关于 git notes 的适当文档。我使用 git notes add 命令向其中一个提交添加了一些注释。但是当我推送提交,然后进行单独的克隆时,我在那里看不到注释消息。有没有办法推送通过 git notes 命令添加的所有笔记消息?

回答by simont

According to here [git-scm.org], you can use

根据这里 [git-scm.org],您可以使用

git push <remote> refs/notes/*

to push all notes. Fetching can be done with

推送所有笔记。获取可以完成

git fetch origin refs/notes/*:refs/notes/*