解决方案有三种:

1,无视,直接commit自己的代码。

git commit -m "your msg"

2,stash

stash翻译为“隐藏”,如下操作:

git stash
git pull
git stash pop
然后diff一下文件,看看自动合并的情况,并作出需要的修改。

git stash: 备份当前的工作区的内容,从最近的一次提交中读取相关内容,让工作区保证和上次提交的内容一致。同时,将当前的工作区内容保存到Git栈中。
git stash pop: 从Git栈中读取最近一次保存的内容,恢复工作区的相关内容。由于可能存在多个Stash的内容,所以用栈来管理,pop会从最近的一个stash中读取内容并恢复。
git stash list: 显示Git栈内的所有备份,可以利用这个列表来决定从那个地方恢复。

git stash clear: 清空Git栈。此时使用gitg等图形化工具会发现,原来stash的哪些节点都消失了。

3,硬覆盖:放弃本地修改,直接用git上的代码覆盖本地代码:

git reset --hard
git pull

补充在 android studio 中的上述操作对应的图:

方法 2 stash:

方法 3 硬覆盖:

然后选择

Git 冲突:Your local changes would be overwritten by merge. Commit, stash or revert them to proceed.的更多相关文章

  1. your local changes would be overwritten by merge. commit stash or revert them to proceed. view them

    error log: your local changes would be overwritten by merge. commit stash or revert them to proceed. ...

  2. Git出现error: Your local changes to the following files would be overwritten by merge: ... Please, commit your changes or stash them before you can merge.的问题解决(Git代码冲突)

    在使用git pull拉取服务器最新版本时,如果出现error: Your local changes to the following files would be overwritten by m ...

  3. git文件冲突合并的报错:Your local changes to the following files would be overwritten by merge

    记录一下在项目里使用git遇到代码冲突时的解决方法 问题:当我和我同事两个人改了相同的一个文件,他在我提交前提交了,这时候我就提交不了了,并且也pull不下来他的代码 会报错: Your local ...

  4. 解决git pull出现: 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 mer ...

  5. Laravel 5.2--git冲突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 mer ...

  6. "Your local changes to the following files would be overwritten by merge" on git

    运行: git merge --ff origin/master 得到错误信息: error: Your local changes to the following files would be o ...

  7. Git版本控制工具使用:Error pulling origin: error: Your local changes to the following files would be overwritten by merge

    摘自: CSDN 逆觞 git在pull时,出现这种错误的时候,可能很多人进进行stash,相关stash的请看:Error pulling origin: error: Your local cha ...

  8. git error: Your local changes to the following files would be overwritten by merge:xxxxxx ,Please commit your changes or stash them before you merge.的phpstorm解决办法

    git报错 error: Your local changes to the following files would be overwritten by merge: .idea/encoding ...

  9. 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 ...

随机推荐

  1. GitHub for mobile 来了,码农苦逼了!

    北京时间 2019 年 11 月 14 日 GitHub Universe 2019 大会上,GitHub 正式发布了 GitHub for mobile,即 GitHub 的移动版本,支持 iOS ...

  2. Go:为何带来泛型

    中文版 English version 介绍 [这是在Gophercon 2019上发表的演讲版本.视频链接可供使用.] 这篇文章是关于向Go添加泛型的意义,以及为什么我认为我们应该这样做.我还将介绍 ...

  3. HttpClient爬取网站及图片

    1.什么是HttpClient? HttpClient 是 Apache Jakarta Common 下的子项目,用来提供高效的.最新的.功能丰富的支持 HTTP 协议的客户端编程工具包,并且它支持 ...

  4. [Gamma]阶段测试报告

    后端测试 我们进行了覆盖性测试,覆盖率达到77%. Beta阶段发现的Bug 项目显示的图片错误 无法使用搜索框 发布实验室项目的按钮点击无法跳转 连续点击发帖按钮可能发出多个相同的帖子 不需要点击我 ...

  5. Qt应用开发常见问题

    Qt判断当前操作系统? 可使用宏判断,例如: #ifdef Q_OS_MAC //mac ... #endif #ifdef Q_OS_LINUX //linux ... #endif #ifdef ...

  6. odoo @api.constrains _sql_constrains

    实现机制: @api.constrains('fields') 服务器启动时将模型中的所有约束方法注册到对象池中: 在create.write时会根据创建或修改的fields检查是否有对应的约束方法, ...

  7. 模拟 + 打表 --- Emag eht htiw Em Pleh

    Emag eht htiw Em Pleh Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 2578   Accepted: ...

  8. springmvc接收参数为日期类型

    用单个Date类型接收日期类型时,会出现报错,加上initBinder的方法 意思是将所有传入的参数都通过此方法,如果过是日期通过日期格式化器进行格式化 如果是接收类型为对象内的属性为Date类型时 ...

  9. 【题解】Editor [HDU4699]

    [题解]Editor [HDU4699] 传送: \(Editor\) \([HDU4699]\) [题目描述] 有一个维护整数序列的强大编辑器,初始状态为空,下面提供五种不同的操作,给出的总操作次数 ...

  10. 修改host文件加速访问github

    修改本地电脑系统 hosts 文件C:\Windows\System32\drivers\etc,直接在最后加入以下代码 192.30.253.112 github.com 192.30.253.11 ...