首页 > 其他分享 >Your configuration specifies to merge with the ref

Your configuration specifies to merge with the ref

时间:2023-07-30 09:33:30浏览次数:40  
标签:specifies git roof merge task identify kaizenly configuration 分支

目录

Your configuration specifies to merge with the ref

1. 执行 git pull 命令时,错误提示:

Your configuration specifies to merge with the ref 'refs/heads/task_floor_display' from the remote, but no such ref was fetched.

如上问题(您的配置指定要与来自远端的task_floor_display分支合并,但是没有获取到这样的分支task_floor_display),可能产生原因与解决方案:

1.1 场景:分支名称拼写错误

1.1.1 场景描述

当需要切换子分支时,发现切换命令执行成功后,想拉去新分支的代码时,git pull命令会出现此失败。

1.1.2 产生原因

子分支可能是同事创建的,子分支的命名比较晦涩难记,难免将分支名称记错或者单词被拼写错误,最容易导致此种场景。建议git创建子分支时,名称字符全部小写,词间用下划线隔开,这样可以降低出错概率。

1.1.3 解决方案

由于是将分支名称拼写错误,请仔细检查分支名称每一个字母(尤其注意大小写)和下划线等字符。

为了还原“事故现场”,再演示一遍。

如果分支名称写错,那么就会出现如下的操作场景(一个很好的分支名称错误实例:分支名称的大小写错误,即将小写t误写成大写T酿成的悲剧)。

kaizenly@kaizenly-P1 MINGW64 /f/integration/gjg (task_SteelConcrete)
$ git checkout task_identify_roof_Tie
Branch task_identify_roof_Tie set up to track remote branch task_identify_roof_Tie from origin.
Switched to a new branch 'task_identify_roof_Tie'

kaizenly@kaizenly-P1 MINGW64 /f/integration/gjg (task_identify_roof_Tie)
$ git pull
Your configuration specifies to merge with the ref 'refs/heads/task_identify_roof_Tie'
from the remote, but no such ref was fetched.

kaizenly@kaizenly-P1 MINGW64 /f/integration/gjg (task_identify_roof_Tie)
$ git checkout task_identify_roof_tie
Switched to branch 'task_identify_roof_tie'

kaizenly@kaizenly-P1 MINGW64 /f/integration/gjg (task_identify_roof_tie)
$ git pull
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

    git branch --set-upstream-to=origin/<branch> task_identify_roof_tie


kaizenly@kaizenly-P1 MINGW64 /f/integration/gjg (task_identify_roof_tie)
$ git branch --set-upstream-to=origin/task_identify_roof_tie task_identify_roof_tie
Branch task_identify_roof_tie set up to track remote branch task_identify_roof_tie from origin.

kaizenly@kaizenly-P1 MINGW64 /f/integration/gjg (task_identify_roof_tie)
$ git pull
Already up-to-date.

kaizenly@kaizenly-P1 MINGW64 /f/integration/gjg (task_identify_roof_tie)
$

特别注意:GIT命令不区分大小写,但是GIT命令中使用的分支名称是区分大小写的。

1.2 场景:远程端同名分支已被删除

1.2.1 场景描述

当需要切换子分支时,发现切换命令执行成功后,想拉去新分支的代码时,git pull命令会出现此失败。

1.2.2 产生原因

以前本地拉取过此分支的代码,现在切换分支命令执行成功。但是当想拉去此分支代码时,git发现远端库中此分支已经被人删除,无法准确指定到此分支。

1.2.3 解决方案

重新建个分支,如下命令:

1 ----------------------------------------------------------
2 git checkout integration
3 git pull
4 git branch task_floor_display
5 git push origin task_floor_display
6 git push --set-upstream origin task_floor_display
7 git checkout task_floor_display
8 git pull
9 ----------------------------------------------------------

1.3 场景:其它场景(排除场景1和场景2)

1.3.1 场景描述

当需要切换子分支时,发现切换命令执行成功后,想拉去新分支的代码时,git pull命令会出现此失败。

1.3.2 产生原因

本地git命令操作不规范,或者旧分支有冗余的代码,导致可能会出现此错误。

1.3.3 解决方案

通过clean up命令清理一次。先备份(因为clean up会删除掉)好多余代码,在本地代码source根目录下,执行clean up命令,然后再执行git pull命令。

标签:specifies,git,roof,merge,task,identify,kaizenly,configuration,分支
From: https://www.cnblogs.com/Braveliu/p/17591009.html

相关文章

  • @Configuration注解的作用
    @Configuration可理解为用spring的时候xml里面的<beans>标签@Bean可理解为用spring的时候xml里面的<bean>标签参考:https://blog.csdn.net/liuyinfei_java/article/details/820118051、第一种自己写的类,Controller,Service。用@controller@service即可2、第二种,集成其它框架,比......
  • fatal: refusing to merge unrelated histories
    ​ "fatal:refusingtomergeunrelatedhistories"是Git在合并操作时可能会遇到的错误信息。这个错误通常出现在尝试合并两个不相关的代码仓库或两个没有共同历史的分支时。Git默认情况下会拒绝合并这些不相关的历史,因为它无法确定如何正确地将它们合并在一起。这个错误......
  • fatal: refusing to merge unrelated histories
    ​ "fatal:refusingtomergeunrelatedhistories"是Git在合并操作时可能会遇到的错误信息。这个错误通常出现在尝试合并两个不相关的代码仓库或两个没有共同历史的分支时。Git默认情况下会拒绝合并这些不相关的历史,因为它无法确定如何正确地将它们合并在一起。这个错误......
  • fatal: refusing to merge unrelated histories
     "fatal:refusingtomergeunrelatedhistories"是Git在合并操作时可能会遇到的错误信息。这个错误通常出现在尝试合并两个不相关的代码仓库或两个没有共同历史的分支时。Git默认情况下会拒绝合并这些不相关的历史,因为它无法确定如何正确地将它们合并在一起。这个错误信息是......
  • 通过docker安装的jira提示We've detected a potential problem with JIRA's Dashboard
    正常通过docker安装jira后,访问是不会出问题的但是如果使用nginx代理后,就是在nginx里配置了proxy_passhttp://localhost:2800再访问后,就会报错We'vedetectedapotentialproblemwithJIRA'sDashboardconfigurationthatyouradministratorcancorrect.Clickhereto......
  • mysql MERGE INTO
    如何使用MySQL的MERGEINTO概述在MySQL中,MERGEINTO语句可以用于合并(插入或更新)一张表的数据到另一张表中。这对于数据同步或数据更新非常有用。本文将介绍如何使用MERGEINTO语句,并提供一个步骤表格来指导你完成这个任务。步骤下面是使用MERGEINTO语句的步骤表格:步骤操......
  • 每N行合并单元格 LoopMergeStrategy
    对每N行合并单元格LoopMergeStrategy对1到11列(下标从0开始)每6行合并  EasyExcel.write(file).head(title).registerWriteHandler(newLoopMergeStrategy(6,0)).registerWriteHandler(newLoopMergeStrategy(6,1))......
  • 数据库高效批量更新操作 MERGE INTO
    使用UPDATE批量更新大量的数据,会出现效率低下,有时候甚至卡死的情况,后面通过使用MERGEINTO代替UPDATE执行批量更新,会提升执行效率。原理:因为UPDATE关联子查询写法,是选到一条做一次子查询,这种写法得更新少,走好的索引才行,MERGE写法是执行完ON后一次性更新,效率会好点。......
  • ASP.NET Core中的配置Configuration的使用及其源码解析
    本章将和大家分享ASP.NETCore中的配置Configuration的使用及其源码解析。1、使用IConfiguration读取配置文件内容Demo的目录结构如下所示:本Demo的Web项目为ASP.NETCoreWeb应用程序(目标框架为.NETCore3.1)MVC项目。 首先添加配置文件,内容如下所示:(注意:配置文件的编码......
  • Android编译报错Caused by: java.lang.RuntimeException: Manifest merger failed wit
    Android编译报错Causedby:java.lang.RuntimeException:Manifestmergerfailedwithmultiple这种异常一般是引用了aar,如果项目中的manifestapplication配置和aar中不一样就会报错,比如android:icon和aar中不一致,则添加tools:replace="android:icon"配置即可。......