我想使用 git notes 来做发行说明,但我不确定其他人是否使用相同的 ref 更改了我的 git notes。
顺便说一句,chmod 444 .git/refs/notes/abc_test
& .git/logs/refs/notes/abc_test
不起作用。
最佳答案
我不认为你真的可以保护已发布的 git 笔记。
你可以做的是将它们放在显式的 namespace 中,如前所述in here :
I think for "typical usage" one stores others' notes in a different place anyways, e.g. I store Thomas' list-notes in refs/remotes/trast/notes/ so that they don't interfer with my own notes.
如果在同一个命名空间中,那么they can be merged :
git checkout refs/notes/commits
git fetch origin refs/notes/commits
git merge FETCH_HEAD
git update-ref refs/notes/commits HEAD
git checkout master
但这会改变他们的内容。
关于git - 如何确保其他人不能编辑我的 git 笔记?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13174215/