github - How to use git to download a tag
天蓬老师
天蓬老师 2017-05-02 09:35:46
0
4
579

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.

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(4)
曾经蜡笔没有小新

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

左手右手慢动作

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.

小葫芦

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

大家讲道理


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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template