Git:我如何将一个带标签的修订版放到我的叉子中? [英] Git: How do I pull a tagged revision into my fork?

查看:90
本文介绍了Git:我如何将一个带标签的修订版放到我的叉子中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在github上有一个项目分支,主干最近被标记了。我想从标记的修订版中将代码拖入我的fork中。我会如何做到这一点?

I have a fork of a project on github where the main trunk was recently tagged. I want to pull the code from the tagged revision into my fork. How would I do that?

推荐答案

一旦你在本地仓库中有标签,你可以做一些类似于

Once you have the tag in local repository you can do something like


git merge tags / yourtag

如果您本地没有trunk标签,您可以使用

If you don't have the "trunk" tags locally, you can fetch it using


git fetch remote-urlrefs / tags / *:refs / tags / *

或通过设置远程站点


git remote add upstream remote-url

git remote add upstream remote-url

并使用

and fetching the stuff using


git fetch -t upstream

我认为使用


git远程更新

会有类似的效果。

这篇关于Git:我如何将一个带标签的修订版放到我的叉子中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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