- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我试图将 foo
存储库复制到新的 fooBar
存储库中。我遇到了一个错误,这是我所做的:
fooBar
的新空白存储库foo
相同的目录中手动创建了 foo
文件夹(我想复制的存储库)的副本。foo(Copy)
重命名为fooBar
。 cd fooBar
并根据 How to remove origin from git repository 运行 git remote rm origin
(这可能是一个错误,因为我只是使用 github,而不是 git-svn)fooBar
仓库,如下所示:git remote add origin https://github.com/myteam/fooRepo.git
git push -u origin development
(请注意,我使用了 development
而不是 master
- 我认为 master
没有有任何意义,只是一个约定)fooBar
文件夹。然后我试着 pull 它git clone https://github.com/myAccount/fooBar.git
然后我得到以下信息:
Cloning into 'fooBar'...
remote: Counting objects: 9297, done.
remote: Compressing objects: 100% (1727/1727), done.
remote: Total 9297 (delta 7542), reused 9297 (delta 7542), pack-reu
Receiving objects: 100% (9297/9297), 1.58 MiB | 253.00 KiB/s, done.
Resolving deltas: 100% (7542/7542), done.
warning: remote HEAD refers to nonexistent ref, unable to checkout.
我找不到克隆时突出显示的错误的答案 - 每个人在删除远程分支并尝试 pull 它时似乎都遇到了问题。
warning: remote HEAD refers to nonexistent ref, unable to checkout.
请注意,在我的新 fooBar
存储库中,development
是唯一的分支并且它设置为 Default
。
最佳答案
克隆一个 repo 默认分支是 master
。但是你的 master
是 bare (没有您的源文件的工作或 check out 副本
)。所有代码都在 development
分支中。
因此,您需要在克隆时提及development
分支。或者,您需要推送一个 master
分支。
试试这个:
$ git clone https://github.com/myAccount/fooBar.git --branch development
或者,
$ git clone https://github.com/myAccount/fooBar.git --branch development -b development --single-branch
关于Github 克隆 repo 错误 : warning: remote HEAD refers to nonexistent ref, 无法 checkout ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41269587/
我正在使用Docker代理编写我的第一个Jenkins管道。执行管道时,在Run Docker Image阶段的日志中出现以下错误(请注意,为清楚起见已删除了管道步骤): sh: can't crea
我正在遍历一组简单(JSON 样式)对象,其中一些具有给定属性,而另一些则没有。如果它们具有该属性,可以安全地假设它永远不会计算为假值。 var objs = [ {'a': 1, 'b':
此段出自书JavaScript: The Definitive Guide, 6th edition , 第 58 页: When any identifier appears by itself i
我正在尝试使用 mutt 从命令行运行我的电子邮件。我一直在尝试遵循这两个指南:http://blog.developwithpassion.com/2013/05/02/getting-up-and
所以,这个查询: mysql_query("UPDATE item SET name = 'foo' WHERE name = 'bar'"); 返回 1,但表中不存在值“bar”。正如预期的那样,数
我有一个 PHP 脚本创建一个 MySQL 转储,从浏览器启动时运行良好。它通过 exec() 函数调用 mysqldump。 我将此 PHP 脚本安排为 根在 crontab 中(在 Ubuntu
我有几个已完成的 AMS(Azure 媒体服务)作业,但与原始视频 Assets 无关。这些 Assets 称为“不存在的 Assets ”。 为什么要创建这样的 Assets ?我该如何照顾他们?
我有几个已完成的 AMS(Azure 媒体服务)作业,但与原始视频 Assets 无关。这些 Assets 称为“不存在的 Assets ”。 为什么要创建这样的 Assets ?我该如何照顾他们?
我下载了 VLFeat lib 从它的 git 存储库!我按照 installation 中的说明进行操作页。但是当我运行 vl_setup 命令时,我收到了这个警告: 警告:名称不存在或不是目录:.
我正在尝试克隆一个存储库,但不能。这是我得到的: username@dev:~$ sudo git clone username@localhost:reponame reponame Initial
我可以在命令行上运行这个循环: for /f "tokens=2" %i in ('arp -a ^| Find/i "dynamic"') do echo %i 但是如果我运行同一个 bat 文件,
我正在尝试修改 Bokeh 库图中的代码。它的链接是 here 。 我的目标是为绘图提供不同的 y 尺度。我编辑了 make_plot 函数,而是复制该函数的内容来尝试制作第二个(右上)图,使用 x
我是 Casperjs 的新手,我试图让这个脚本复制一些文本,但即使我有正确的路径,它也无法找到搜索按钮。我之前能够单击脚本中的所有按钮,但它在该行给出了错误: casper.wait(200
我面临与此 thread 中相同的问题.当我使用 make html 构建我的 Sphinx 文档时,我收到了很多这样的警告 None:None: WARNING: toctree contains
根据文档,docker volumes 有一个“inmemory”驱动程序: https://docs.docker.com/registry/storage-drivers/inmemory/ Fo
我正在尝试使用 Sphinx 为大型 python 代码库自动创建 api 文档。 我尝试过使用 build_modules.py 和 sphinx-apidoc。使用任何一个,我都可以在我的输出目录
几天前我开始使用 Sphinx 来记录一个 python 包,我得到了一个似乎很常见的错误,但我找不到解决方案。 我使用 sphinx-quickstart 来设置所有内容。我使用“doc/”作为文档
考虑这个模型定义和用法: from django.db import models class User(models.Model): name: str = models.CharField
我在尝试编写显示大文件前 5 行的程序时遇到错误。 C:\blah\aeea2>for /L %f in (1,1,500) do @echo zzzzzzzzzzzzzzzzzzzzzzzzzzzz
我在尝试编写显示大文件前 5 行的程序时遇到错误。 C:\blah\aeea2>for /L %f in (1,1,500) do @echo zzzzzzzzzzzzzzzzzzzzzzzzzzzz
我是一名优秀的程序员,十分优秀!