赞
踩
1、克隆远程仓库
git clone https://gitee.com/xxx/xxx.git
2、查看分支
git branch -a
* master
remotes/origin/HEAD -> origin/master
remotes/origin/last_hard
remotes/origin/master
3、将本地分支与远程保持同步
git fetch
4、新建本地分支,名称与远程仓库分支名称一致,并同步远程分支
git checkout -b last_hard origin/last_hard
5、同步所有远程分支
git branch -r | grep -v ‘->’ | while read remote; do git branch --track “KaTeX parse error: Expected '}', got '#' at position 8: {remote#?origin/}" "remote”; done
6、将本地所有分支与远程保持同步
git fetch --all
7、最后拉取所有分支代码
git pull --all
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。