git进阶 | 02 - git设置追踪所有远程分支

一、clone默认结果

以TencentOS-Tiny仓库为例:

git clone https://github.com/OpenAtomFoundation/TencentOS-tiny


这个时候查看本地分支情况:

git branch


查看隐藏分支:

git branch -a

二、追踪所有远程分支

git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done


执行后再次查看本地分支:

猜你喜欢

转载自blog.csdn.net/Mculover666/article/details/125646138
今日推荐