作者热门文章
- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
似乎没有关于 git notes 的适当文档。我使用 git notes add 命令向其中一个提交添加了一些注释。但是当我推送提交,然后再做一个单独的克隆时,我在那里看不到注释消息。有没有办法推送所有通过 git notes 命令添加的笔记信息?
最佳答案
推送所有笔记:
git push <remote> refs/notes/*
获取所有笔记:
git fetch origin refs/notes/*:refs/notes/*
警告:不要使用 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/
我是一名优秀的程序员,十分优秀!