kingBook

导航

git clone 从远程库克隆和更新到本地

从远程库克隆到本地

$ git clone git@github.com:kingbook/Framework.git

$ git clone http://github.com/kingBook/Framework.git    #实际测试较快
$ git clone --depth=1 https://...... #只clone最近一次提交

获取更新到本地

$ git pull

使用git clone --depth=1 远程有的分支本地没有时

$ git remote set-branches origin 'remote_branch_name'
$ git fetch --depth 1 origin remote_branch_name
$ git switch remote_branch_name

posted on 2017-09-30 10:00  kingBook  阅读(524)  评论(0编辑  收藏  举报