0

有可能吗?

我已阅读文档,您可以在本地配置它,.git/config 例如:

[remote "origin"]
  fetch = +refs/heads/*:refs/remotes/origin/*

但这是本地设置,据我了解,我无法将其推送到 github 或 bitbucket。能不能强制大家拉笔记?

4

1 回答 1

1

能不能强制大家拉笔记?

(强调我的)不。

[remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*

这是正常设置。您需要添加一个设置来复制笔记参考。有很多可能的方法可以做到这一点,例如,如果您从不自己做笔记:

[remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*
    fetch = refs/notes/commits:refs/notes/commits

如果你自己笔记,你会想要一些更漂亮的东西,例如:

[remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*
    fetch = +refs/notes/commits:refs/notes/origin/commits

然后在运行时操纵core.notesRef设置和/或使用。--notes=git log

然而,每个想要笔记的人都必须通过在他们的配置中添加额外的行来专门询问笔记。fetch

于 2017-05-26T16:55:19.273 回答