获得指定版本的代码
https://blog.51cto.com/u_296714/5588544
git clone -b 1.18.0 https://github.com/passedbylove/poiji.git
现在,我想获得frp的0.51.3版本
git clone -b 0.51.3 https://github.com/fatedier/frp
Cloning into 'frp'...
fatal: Remote branch 0.51.3 not found in upstream origin
明明它有这个版本
https://github.com/fatedier/frp/releases/tag/v0.51.3
如果你要检出
tags
对应得版本,需要正确使用branch/tag name
来检出。所以修改了一下:
至于为什么你使用
git clone -b 1.18.0 https://github.com/passedbylove/poiji.git
可以正确检出,对应得版本,是因为passedbylove/poiji.git
这个仓库不光对应得版本打了tag
,他还保留了对应版本的branch
他的分支是没有v
开头的。所以你使用
git clone -b 1.18.0
也可以正确检出。而fatedier/frp
这个仓库,每一个版本的分支并没有保留下来。