Git - Checkout a remote tag when two remotes have the same tag name

前端 未结 4 1514
不知归路
不知归路 2020-11-28 21:49

I had hoped this would work:

git checkout remote/tag_name

but it doesn\'t. This does:

git checkout tags/tag_name

4条回答
  •  隐瞒了意图╮
    2020-11-28 22:40

    1 - Fetch the tag from the remote with:

    git fetch origin --tags 
    

    Or, to checkout a tag from a different remote use:

    git fetch your_remote --tags
    

    2 Check out the tag by running

    git checkout tags/
    

    More here: Download a specific tag with Git

提交回复
热议问题