git命令 推送所有分支到新仓库
一、克隆仓库
shell
git clone git@gitee.com:striver-wy/test-code.git
二、查看原始的origin
shell
git remote -v
三、查看所有分支
shell
git branch -a
四、获取所有远程分支到本地
shell
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote";done
五、获取该项目远程库的所有分支及其内容
git fetch --all
六、获取该项目远程库的标签
git fetch --tags
七、推送所有分支及其内容
git push origin --all
八、推送所有标签及其内容
git push --tags