gpt4 book ai didi

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

转载 作者:IT王子 更新时间:2023-10-29 00:44:15 26 4
gpt4 key购买 nike

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

最佳答案

推送所有笔记:

git push <remote> refs/notes/*

获取所有笔记:

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

[ [git-scm.org] (archive) ]

警告:不要使用 git pull 代替 git fetch(即 git pull origin refs/notes/*:refs/notes/* 是错误的)。整体细节很复杂,但 git pull 在这里出错的具体原因是您不想将 refs/notes/commits 与当前分支 merge 或 rebase 。

关于git:如何将git笔记添加的消息推送到中央git服务器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18268986/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com