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.
曾经蜡笔没有小新2017-05-02 09:37:46
Click to get the tag URLgit clone --branch v1.6.5.7 https://github.com/ManaPlus/ManaPlus.git
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.
高洛峰2017-05-02 09:37:46
Then use the git
command 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
大家讲道理2017-05-02 09:37:46
man git clone The result found shows git clone -b <branch name or tag name>