0


Git 根据远程分支拉取并创建本地分支

文章目录

1 关联远程仓库

git remote add remote_repo ssh:git@***.git

2 获取最新更改,并创建分支

查看本地分支和远程分支

git branch -a

获取最新更改

git fetch remote_repo

根据远程分支创建本地分支

git checkout -b br_*** remote_repo/br_***

此时会根据远程分支创建本地分支,并拉取最新的内容

查看本地分支追踪的远程分支

git branch -vv

3 clone时直接指定远程分支

git clone -b br_*** ssh:git@***.git

参考

git基于远程分支创建本地分支 https://blog.csdn.net/shitianxiang/article/details/117953533

标签: git

本文转载自: https://blog.csdn.net/qq_44776065/article/details/142795481
版权归原作者 LiQiang33 所有, 如有侵权,请联系我们删除。

“Git 根据远程分支拉取并创建本地分支”的评论:

还没有评论