当叉子存在时,是否有办法优雅地改变git分支的历史? [英] Is there a way to gracefully change a git branch's history when forks of it exist?

查看:115
本文介绍了当叉子存在时,是否有办法优雅地改变git分支的历史?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用git的过滤器分支功能更正一些无效的作者信息。问题是分支的分支会不同步。

是否有将更改提交日志合并到分支中的问题?

在这种情况下,你可以做的最好的事情就是添加注释( kernel.org/pub/software/scm/git/docs/git-notes.htmlrel =nofollow> git notes ) 。



正如使用 git notes 用于发放实际贡献积分


我们可以使用Git的笔记功能来解决我们在授信过程中遇到的大量问题。

基本上,笔记是一种可以将附加元数据附加到提交的方式。


尽可能多的命名空间,以及每个命名空间中我们想要的尽可能多的命名空间。同一个人可以因为做多件事而获得荣誉。


因此,为这种修正定义一个特殊的命名空间,至少信息可以在这里生存(并克隆) p>

I would like to correct some invalid authorship information using git's filter-branch feature. The problem is that there are forks of the branch which would then be out of sync.

Is there anyway to merge the changes to the commit log into the forks?

解决方案

The best you could do in this case is to add notes (git notes).

As mentioned in "Using git notes for doling out real contribution credit":

we could use Git's notes feature to solve a ton of our problems related to giving credit where credit is due.
Basically, notes are a way that you can attach additional metadata to a commit.

As many namespaces as we want, and as many items in each namespace as we want. The same person can get credit for doing multiple things.

So define a special namespace for that kind of correction, and at least the information can live (and get cloned) here.

这篇关于当叉子存在时,是否有办法优雅地改变git分支的历史?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆