git clone指定branch或tag

git clone指定branch或tag
发布时间:October 28, 2018 // 分类: // No Comments

取完整:


git clone https://github.com/arvidn/libtorrent.git
cd libtorrent/
查看branch:


git branch -a
* master
remotes/origin/HEAD -> origin/master
remotes/origin/RC_1_0
remotes/origin/RC_1_1
使用指定branch:


git checkout origin/RC_1_1
查看tag:


git tag
libtorrent-1_1_8
libtorrent-1_1_9
libtorrent-1_2_0_RC
使用指定tag:

git checkout libtorrent-1_1_9
也可以在clone的时间指定tag或branch:


git clone -b RC_1_1 https://github.com/arvidn/libtorrent.git
git clone -b libtorrent-1_1_9 https://github.com/arvidn/libtorrent.git

猜你喜欢

转载自www.cnblogs.com/gaoyuechen/p/12049398.html
今日推荐