gpt4 book ai didi

Github分支,标签: How to get a specific release of a code?

转载 作者:太空狗 更新时间:2023-10-29 13:20:41 26 4
gpt4 key购买 nike

我是 Git hub 的新手,我对标签和分支的概念感到困惑(已解释 here )我想从 git hub 获得稳定版本的 PhantomJS(版本 2.1.0)。但我不明白我是否应该这样做:

git checkout master
git remote add upstream https://github.com/ariya/phantomjs.git
git fetch upstream
git rebase --onto tags/2.1.0 upstream/master master

git init
git remote add -t 2.1 -f origin https://github.com/ariya/phantomjs.git
git checkout 2.1

你能解释一下是哪一个吗?为什么?

最佳答案

您应该只克隆存储库,然后 checkout 标签:

$ git clone https://github.com/ariya/phantomjs.git
$ cd phantomjs
$ git checkout 2.1

请记住,在标签上,您不能提交您将进行的任何本地更改。为此,你必须在一个分支上。令人困惑的是,该命令对于分支和标签都是 git checkout

关于Github分支,标签: How to get a specific release of a code?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38384670/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com