在使用git拉取远程项目的时候可能会出现

fatal: Need to specify how to reconcile divergent branches. 如图:

解决方式:

第一步:删除该本地分支。

git branch -d 分支名称

如果上面无法删除干脆点强行删除

git branch -D 分支名称

删除完成后会出现

切记,无法删除当前所在的分支,需要切换分支

拓展:删除远程分支

git push origin --delete 远程分支名称

切换分支指令:

git checkout 分支名称

切换成功即可删除本地冲突分支

第二步:远程拉取删除的分支

git fetch origin 分支名称

出现Switched to a new branch 分支名称 表示成功拉取。

当然你在删除分支之后,也可以直接使用git pull,看个人情况而定。

之后代码就可以成功的git pull了

解决git问题:fatal: Need to specify how to reconcile divergent branches.相关推荐

  1. fatal: Need to specify how to reconcile divergent branches.

    报错:fatal: Need to specify how to reconcile divergent branches. 在新克隆的代码库第一次从别的分支拉取代码时报错:需要指定如何协调分歧分支. ...

  2. 解决 git clone fatal: unable to access ‘https://github.com...‘: 的一种方法

    解决 git clone fatal: unable to access 'https://github.com-': Could not resolve host: github.com的一种方法 ...

  3. git报错:(Pulling without specifying how to reconcile divergent branches)

    1 问题背景 如果你也在使用2.27.0及以上版本的Git时,使用git pull命令出现以下的警告文案,可以通过阅读本篇文章来解决此问题. 博主最近在Android Studio上使用git pul ...

  4. git pull和git pull origin master报如下警告Pulling without specifying how to reconcile divergent branches

    git pull和git pull origin master报如下警告 hint: Pulling without specifying how to reconcile divergent bra ...

  5. 解决Git中fatal: refusing to merge unrelated histories

    Git的报错 在使用Git的过程中有时会出现一些问题,那么在解决了每个问题的时候,都需要去总结记录下来,下次不再犯. 一.fatal: refusing to merge unrelated hist ...

  6. 解决Git中fatal: refusing to merge unrelated histories(亲测)

    Git的报错 在使用Git的过程中有时会出现一些问题,那么在解决了每个问题的时候,都需要去总结记录下来,下次不再犯. 一.fatal: refusing to merge unrelated hist ...

  7. 【git系列004】解决 git 未指定冲突处理方法的问题

    解决 git 未指定冲突处理方法的问题 hint: Pulling without specifying how to reconcile divergent branches ishint: di_ ...

  8. 解决git: fatal:refusing to merge unrelated histories

    ** 解决Git中fatal: refusing to merge unrelated histories ** 前言 提示:这里可以添加本文要记录的大概内容: 在使用Git的过程中有时会出现一些问题 ...

  9. 解决git push 中remote: Permission to xxxxx.git denied to xxx. fatal: unable to acce

    解决git push 中remote: Permission to xxxxx.git denied to xxx. fatal: unable to acce 解决方案一 解决方案二 解决方案一 第 ...

最新文章

  1. java中如何取到一个对象的所有属性值,并且在创建一个相同的对象
  2. C#CodeSmith代码批量生成模板制作经验分享
  3. react 动态修改路由_reactjs – 如何动态添加重定向到反应路由器?
  4. (原创)SpringBoot入门
  5. matlab guide实现多级界面
  6. A damn at han’s Windows phone book 笔记(23:序列化,图片)
  7. datax 不识别字段过滤_静电式空气过滤器有什么特点 静电式空气过滤器特点介绍【详解】...
  8. RocketMQ入门到入土(六)发消息的时候选择queue的算法有哪些?
  9. ad gerber文件生成_Gerber竟然可以倒转PCB文件!!!
  10. jxl读数据库数据生成xls 并下载
  11. 激光成像雷达技术 你了解清楚了吗?
  12. 为什么很多开发都要转测试....详谈....
  13. 虫师带你入门Chrome Headless,从此爬虫0门槛!
  14. 解决git文件夹图标消失
  15. 重装windows10系统的教程
  16. 暗通道理论详解及的Python实现
  17. 适合新手的mac电脑使用技巧 苹果电脑的快捷键和使用技巧
  18. mysql中的ip存储与查询
  19. Exception:There is no getter for property named ‘qo‘ in ‘class cn.xxxxxx.rbac.qo.XxxxQo 的两种错误可能及解决方案
  20. Location is not available,the folder or directory is corrupted and unreadable

热门文章

  1. 业界最权威精准的转向模型来啦 MdynamiX为汽车智能化电气化的新型转向系统开发提供全流程解决方案
  2. 鼎甲第14期 Back You Up 公开课:迪备在Oracle DataGuard环境中的使用
  3. 软件工程作业——《人月神话》读书笔记
  4. 关于安卓版酷狗6.0的用户调研统计及一些修改建议
  5. 利用js 获取本日 本周 本月时间代码
  6. codeforces Round #675 (Div. 2) 1422C Bargain
  7. 【产品工作方法】产品需求调研
  8. 瓦尔机器人智能行李箱_国产COWA ROBOT智能拉杆箱:能跟着你走
  9. MangoDB 学习指南
  10. 微信公众号排版多少钱一篇?