如何从存储库检出分支

编程入门 行业动态 更新时间:2024-10-21 19:26:42
本文介绍了如何从存储库检出分支的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个叫做颜色调色板的回购( github/3gwebtrain / color-palette.git ),它也有其他分支。

我想克隆一个名为的分支-color 到我的本地系统。但不工作。

我使用的命令是:

git checkout -b github/3gwebtrain/color-palette.git origin / same-color

但这不起作用。得到的错误为:

fatal:不是git仓库(或任何父目录):.git

这里有什么不对?

解决方案

git命令:

git clone github/3gwebtrain/color-palette.git -b同色 - - 单支

I have a repo called as 'color-palette ( github/3gwebtrain/color-palette.git) and it has other branches too.

I would like to clone one of the branch called same-color to my local system. But not working.

the command i used is :

git checkout -b github/3gwebtrain/color-palette.git origin/same-color

But this is not working. getting error as :

fatal: Not a git repository (or any of the parent directories): .git

what is wrong here?

解决方案

I have done with below single git command:

git clone github/3gwebtrain/color-palette.git -b same-color --single-branch

更多推荐

如何从存储库检出分支

本文发布于:2023-11-28 16:33:45,感谢您对本站的认可!
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:检出   分支

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!