普通的方式
拉取的是所有分支的代码:
git clone -b dev https://github.com/vuejs/vuex.git

基于远程分支(master)新建本地分支(master): git checkout master
最小化拉取的方式(按需拉取)
只拉取 dev 分支的代码:
git clone --single-branch -b dev https://github.com/vuejs/vuex.git

基于远程分支新建本地分支:
git remote set-branches origin --add master
git fetch origin master
git checkout master

网友评论