解决方案有三种:

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. java web开发入门三(Hibernate)基于intellig idea

    Hibernate 1.开发流程 项目配置好后的结构: 1.下载源码: 版本:hibernate-distribution-3.6.0.Final 2.引入hibernate需要的开发包(3.6版本) ...

  2. Flask项目之入门

    from flask import Flask #实例化Flask对象 app = Flask(__name__) #传入当前的文件名__name__ #将‘/’ 和函数index的对应关系添加到路由 ...

  3. jquery根据选择器进行页面赋值,封装赋值方法

    可以进行文本框赋值,文本域赋值,下拉列表赋值,单选框赋值,多选框赋值, 传入对象,可以根据元素name进行比对赋值,不用每个进行单独赋值 <!DOCTYPE html> <html ...

  4. 提取文件中的每一个mask,并将mask命名为文件名字

    import cv2 as cv import random import glob import os from PIL import Image import shutil def get_sam ...

  5. kibana We couldn't activate monitoring

    调节一下监控状态查询的时间范围,有时候,刚启动监控,数据没有生成.把”last 1 hour“改成 具体有数据的时间 用如下语句查看,监控日志在不断生成.重启kibana后正常有监控画面了. GET ...

  6. C# PKCS7加密解密

    //加密字符串 public string Encryption(string toE) { //加密和解密必须采用相同的key,具体自己填写,但是必须为32位 "); RijndaelMa ...

  7. 【06月04日】A股滚动市盈率PE历史新低排名

    2010年01月01日 到 2019年06月04日 之间,滚动市盈率历史新低排名. 上市三年以上的公司,2019年06月04日市盈率在300以下的公司. 1 - 阳光照明(SH600261) - 历史 ...

  8. hive 批量添加,删除分区

    一.批量添加分区:   use bigdata; alter table siebel_member add if not exists partition(dt='20180401') locati ...

  9. 快速排序详解(C语言/python)

    快速排序详解 介绍: 快速排序于C. A. R. Hoare在1960年提出,是针对冒泡排序的一种改进.它每一次将需要排序的部分划分为俩个独立的部分,其中一个部分的数比的数都小.然后再按照这个方法对这 ...

  10. hanlp添加词典不起作用

    不起作用的原因很多,这里列举几个 这里的hanlp我虽然用的maven建立的但是要添加自定义词典,所以没有用maven引入的方式,而是下载了data+hanlp.jar文件          data ...