git代码库pull报错:error: Your local changes to the following files would be overwritten by merge
前言
编辑器会把没有添加到忽略名单的文件自动add到git的暂存区。
起因
某次build后打了个zip压缩包放在根目录下,被自动add了,但commit时把勾打掉没有提交。第二天来把这个zip包手动删除后,pull代码时就报错了:
From http://*.*.*.*/cd-h5/customrecipe
* branch master -> FETCH_HEAD
error: Your local changes to the following files would be overwritten by merge:
build.zip
解决
通过 git status 查看
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: build.zip
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
deleted: build.zip
原来是这个zip包被添加到暂存区了,执行命令
git reset
即把当前HEAD中的内容恢复到暂存区,这是再pull就正常了。
附图
更多git相关知识请移步:https://blog.csdn.net/daoke_li/article/details/104295741
git代码库pull报错:error: Your local changes to the following files would be overwritten by merge相关推荐
- git pull 问题“error: Your local changes to the following files would be overwritten by merge”
问题描述: error: Your local changes to the following files would be overwritten by merge 解决办法: 方法1: 如果你想 ...
- 解决 error: Your local changes to the following files would be overwritten by merge:XXXX
前些天发现了一个巨牛的人工智能学习网站,通俗易懂,风趣幽默,忍不住分享一下给大家.点击跳转到教程. idea 上将本地代码推送到 git后 , 报错如下图 error: Your local chan ...
- error: Your local changes to the following files would be overwritten by merge
用git pull来更新代码的时候,遇到了下面的问题: error: Your local changes to the following files would be overwritten by ...
- git版本回退:error: Your local changes to the following files would be overwritten by merge
git pull活git push 代码出现错误,代码冲突: 解决办法: 1.解决冲突再次上传: 2.先退commit,然后再git pull,再修改代码,再上传(之所以使用这个办法,是因为编辑器一点 ...
- 【Git】pull遇到错误:error: Your local changes to the following files would be overwritten by merge:
这种情况下,如何保留本地的修改同时又把远程的合并过来呢? 首先取决于你是否想要保存本地修改. 是 别急我们有如下三部曲 git stash git pull origin master git sta ...
- git pull问题“error: Your local changes to the following files would be overwritten by merge”解决方案
1.stash git stash git commit git stash pop 2. 放弃本地修改,直接覆盖 git reset --hard git pull 原文链接:https://www ...
- error: Your local changes to the following files would be overwritten by merge:
错误:合并将覆盖对以下文件的本地更改 当你的任务做到一半,突然来了一个bug,你想获取最新代码,你不能提交还没有做完的任务,所以你先把你的任务暂存起来,再获取远端的最新文件,然后合并,请看git三连 ...
- 记录:git pull云端小程序代码,报错 Your local changes to the following files would be overwritten by merge
在测试过程中,本地通过HBuilder启动了小程序的项目,启动过一次之后,开发告知有代码更新需要拉取代码. 在使用git pull时,提示 Your local changes to the foll ...
- git pull 提示错误,Your local changes to the following files would be overwritten by merge
error: Your local changes to the following files would be overwritten by merge: Please commit your c ...
最新文章
- (C++)1002 A+B for Polynomials
- 《笑傲网湖》第三回 三层交换
- make: *** [ext/fileinfo/libmagic/apprentice.lo] Er
- 关于类中的引用、常量、静态常量的初始化
- opencv 3和qt5计算机视觉应用开发_【资源分享】有哪些学习openCV的网站或书籍?...
- Zabbix监控Linux主机设置
- 如何在C#中使用Win32和其他库之三
- Luogu P2101 命运石之门的选择(分治+搜索)
- [转]java 组播
- POI读取单元格信息及单元格公式
- 程序员这样聊天,让女神疯狂追逐你
- crop和resize操作区别
- linux学习笔记【转】
- 项目启动会注意事项-甲方
- HTML计算平均成绩,成绩平均分怎么算
- CentOS 8 添加中文语言包
- 技嘉B550M-AORUS-ELITE主板RAID故障与解决方案
- matlab析取范式求主析取范式用电脑,(p∧q)∨r 求其主析取范式 再用主析取范式求主合取范式...
- 诺基亚牌WP7手机——蛮期待的
- 截图转换为gif动图,gif动图制作