我在git-notes --ref changelog
开发时保留我的变更日志。我总是在 merge-to-master 提交上添加注释并将其推送到三个遥控器(git push <remote> refs/notes/changelog
) - 但每次我忘记推送到一个遥控器并fetch
从中推送时,引用都会被一些旧版本覆盖:
(对不起德语语言环境)
$ git fetch github -p
Von github.com:<user>/<repo>
+ ca36d98d...1f3b9041 refs/notes/changelog -> refs/notes/changelog (Aktualisierung erzwungen)
如何防止这种情况?它与我的 有某种关系.git/config
吗?
(摘自.git/config
):
[remote "github"]
url = git@github.com:<user>/<repo>.git
fetch = +refs/heads/*:refs/remotes/github/*
fetch = +refs/pull/*/head:refs/remotes/github/pr/*
push = +refs/notes/changelog:refs/notes/changelog
fetch = +refs/notes/changelog:refs/notes/changelog
[notes "rewrite"]
rebase = true
amend = true
[notes]
rewriteRef = refs/notes/changelog