search

Home  >  Q&A  >  body text

github - How to use git to download a tag

For example:
This warehouse: https://github.com/ManaPlus/ManaPlus

I want to download the tags in the red box below to my local computer. What git command should I use? , do not want to use Download Zip method.

天蓬老师天蓬老师2811 days ago598

reply all(4)I'll reply

  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-05-02 09:37:46

    Click to get the tag URL
    git clone --branch v1.6.5.7 https://github.com/ManaPlus/ManaPlus.git

    reply
    0
  • ringa_lee

    ringa_lee2017-05-02 09:37:46

    You made a mistake. The code you pull is just the default branch with the same name as the tag.

    git fetch
    git checkout tag
    That’s it


    2016-07-03 01:24:25 Correction
    It has been verified that clone -b can directly pull down a tag.
    My previous understanding was that when I checked out the cloned project, I found that the -b parameter could not be used, which led to this wrong understanding.
    If you are not rigorous, take this as a warning.

    reply
    0
  • 高洛峰

    高洛峰2017-05-02 09:37:46

    Then use the gitcommand line to synchronize it locally

    git clone git@github.com:ManaPlus/ManaPlus.git

    For the configuration of git, you can refer to git here. I hope it will be helpful to you

    reply
    0
  • 大家讲道理

    大家讲道理2017-05-02 09:37:46


    man git clone The result found shows git clone -b <branch name or tag name>

    reply
    0
  • Cancelreply