git notes的使用

1. 获取notes

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

2. 设置notes

  2.1 git config --add core.notesRef refs/notes/{name}  (需要注意替换name)

  2.2 export GIT_NOTES_REF=refs/notes/{name} (需要注意替换name)

3. 添加notes

  git notes add <commit-id>

5. 同步notes

  git push origin refs/notes/{name}

6. 查看notes

  git log -p -g refs/notes/{name}

扫描二维码关注公众号,回复: 7030589 查看本文章

  

猜你喜欢

转载自www.cnblogs.com/dakewei/p/11357351.html