Git关于分支常用命令记录,切换分支、下载指定分支 野性酷女 2023-02-14 10:54 1阅读 0赞 ### 切换分支 ### // 查看当前所有分支,如下图红色字体 git branch -a ![示例1][1] // 切换分支 git checkout -b orrgin/xxx // xxx是版本号,如下图红线标注 ![示例2][2] ### 下载指定分支 ### // branchname表示分支名称,具体名称参考 示例3 // xxxx表示URL(注意,具体命令中不带"[xxx]"中括号) git clone -b [branchname] http://[xxxx].git ![在这里插入图片描述][watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzM3ODIwNTgw_size_16_color_FFFFFF_t_70] [1]: https://img-blog.csdnimg.cn/20200602175411283.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzM3ODIwNTgw,size_16,color_FFFFFF,t_70 [2]: https://img-blog.csdnimg.cn/20200602175754628.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzM3ODIwNTgw,size_16,color_FFFFFF,t_70 [watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzM3ODIwNTgw_size_16_color_FFFFFF_t_70]: https://img-blog.csdnimg.cn/20200602183839737.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzM3ODIwNTgw,size_16,color_FFFFFF,t_70
还没有评论,来说两句吧...