将Git注释添加到blob

将Git注释添加到blob

本文介绍了将Git注释添加到blob的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



使用案例:应该可以向git构件添加元数据(如属性)。

p>

我们计划为每个组件提供一个git repo,因此为每个提交对象应用一个便笺可以实现这个要求。





它接受笔记,甚至可以将笔记推送到中央仓库。



这是一个安全可靠的git使用情况吗?

解决方案

是的,您可以这样使用。



博客文章的Git Tip of the Week:Git Notes 提醒我们一些 git notes 优点和难点:

也指出推/拉笔记是如何不容易。



除了这两个问题(合并和推动)之外,你应该与你的' git notes '用例保持一致。


I am trying to realize a use-case using git.

Use Case : It should be possible to add metadata (like Attributes) to git artifacts.

We plan to have a git repo for each component, so applying a note for each commit object could realize this requirement.

Now, it is also required that we have metadata for files within a component (git repo in this case). For this i tried to attach a note to a blob which was part of a commit.

It accepts the note and even I am able to push the notes to central repo.

Is this a safe and reliable usage of git notes for this use-case?

解决方案

Yes, you can use git notes that way.

The blog post "Git Tip of the Week: Git Notes" from Alex Blewitt reminds us about some of the git notes advantages and gotcha:

The "note to self" article also points out how pushing/pulling notes isn't exactly easy.

Beside those two issues (merging and pushing), you should be ok with your 'git notes' use case.

这篇关于将Git注释添加到blob的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-29 04:34