Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Git 吉特分行、再基地、合并及;标签_Git_Github - Fatal编程技术网

Git 吉特分行、再基地、合并及;标签

Git 吉特分行、再基地、合并及;标签,git,github,Git,Github,这是一个非常大的回购协议,有几十万次承诺,分支深度超过20%。只有带有(-r#)标记的提交才是针对我的硬件的提交。我有一个应用于sunxi-v3.4.24-r1标签的补丁 git clone https://github.com/iceblu3710/linux-sunxi-xenomai git checkout sunxi-v3.4.24-r1 git branch -t i-pipe-core-uminded git add . git commit

这是一个非常大的回购协议,有几十万次承诺,分支深度超过20%。只有带有(-r#)标记的提交才是针对我的硬件的提交。我有一个应用于sunxi-v3.4.24-r1标签的补丁

    git clone https://github.com/iceblu3710/linux-sunxi-xenomai
    git checkout sunxi-v3.4.24-r1
    git branch -t i-pipe-core-uminded
    git add .
    git commit
    git push origin/i-pipe-core-uminded
然后,我想用上游内核更改重新设置该分支的基础

    git for-each-ref --format '%(refname)' refs/tags
    NOTE: Any way to get the short hash of the commit with these tags?
这将列出回购协议的所有标签,以下是与我相关的内容:

    refs/tags/sunxi-v3.4.24-r2
    refs/tags/sunxi-v3.4.29-r0
我如何以一种干净的方式将我的分支重新定位到这些标记中的每一个

我的主要问题是rebase需要一个分支名称或散列才能工作,它不接受标记,目前我不知道如何找到标记散列,除了
git log--all | grep“tag”
,这在这么大的回购中需要相当长的时间

谢谢


编辑-这也是一种让sunxi-v3.4.24-r1标记我的回购主程序并放弃之前所有提交的方法吗?我曾经尝试过使用像gitk和smartgit这样的程序,但是日志太大了,以至于内存不足。我永远不会在下游合并,只会跟随标记所在的上游分支

要解决查找标记哈希的问题,可以使用以下命令:

git rev-parse TAG

这将显示提交哈希。

要解决查找标记哈希的问题,可以使用以下命令:

git rev-parse TAG

这将向您显示提交散列。

这就是我想要的,任何组合的方法都与上面的方法相结合,所以
30f766a-sunxi-v3.4.12-r0
是每个rgit cat文件的输出?git--batch check
ef--format%%(refname)'refs/tags/| grep“$@
我认为这会起作用,因为backticks中的一部分会列出一个标记列表,并且--batch check应该接受来自stdout的列表。这就是我想要的,任何结合的方法都要与上面的内容结合起来,所以
30f766a-sunxi-v3.4.12-r0
是每个rgit cat文件的输出?git--batch check
ef--format“%(refname)'refs/tags/| grep“$@”
我以为这会起作用,因为backticks中的一部分会列出一个标记列表,而批处理检查应该接受stdout中的列表。