如何从存储库检出分支 [英] How to checkout a branch from repository

查看:123
本文介绍了如何从存储库检出分支的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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



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



我使用的命令是:

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



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



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



这里有什么不对?

解决方案

git命令:

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


I have a repo called as 'color-palette ( https://github.com/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 https://github.com/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 https://github.com/3gwebtrain/color-palette.git -b same-color --single-branch

这篇关于如何从存储库检出分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆