解决方案有三种:

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. Salesforce 开发整理(四)记录锁定

    如果一个对象的记录在满足某个条件的情况下,希望能对其进行锁定,即普通用户没有权限对其进行编辑操作,记录页面显示如下图 一般会在提交审批,或者项目进行到某个阶段的情况下,由后台进行判断要不要锁定记录,或 ...

  2. nexus没有授权导致的错误

    错误详情信息: 错误信息: [ERROR] Failed to execute goal on project blog: Could not resolve dependencies for pro ...

  3. 【Activiti学习之三】Activiti API(二)

    环境 JDK 1.8 MySQL 5.6 Tomcat 7 Eclipse-Luna activiti 6.0 一.流程定义1.中止与激活流程定义 package com.wjy.pd; import ...

  4. 依赖注入(DI)与控制反转(IOC)基础知识

    依赖注入(DI)与控制反转(IOC)基础知识 一.什么是依赖注入? 依赖注入英文是Dependcy Injection简写DI,依赖注入会将所依赖的对象自动交由目标对象使用,而不是让对象自己去获取. ...

  5. TreeMap源码分析1

    二叉树他们都需要满足一个基本性质--即树中的任何节点的值大于它的左子节点,且小于它的右子节点.按照这个基本性质使得树的检索效率大大提高.我们知道在生成二叉树的过程是非常容易失衡的,最坏的情况就是一边倒 ...

  6. NFS服务器安装测试

    NFS为网络文件系统,允许网络中的计算机通过TCP/IP协议进行网络资源共享. 软件安装: $ sudo apt-get install nfs-kernel-server (1)服务器端 1)创建共 ...

  7. @Value注解无法为static 变量赋值

    使用@Value给静态变量赋值时,出现空指针异常.经了解Spring 不允许/不支持把值注入到静态变量中.所以需要另一种方式为该变量赋值. 需要注意set方法也不要加static修饰符!

  8. Springboot Actuator之十:actuator中的audit包

    前言这篇文章我们来分析一下org.springframework.boot.actuate.security,org.springframework.boot.actuate.audit中的代码,这2 ...

  9. JAVA并发编程: CAS和AQS

       版权声明:本文为博主原创文章,转载请注明出处 https://blog.csdn.net/u010862794/article/details/72892300 说起JAVA并发编程,就不得不聊 ...

  10. Python 监控脚本

    Python 监控脚本 整体通过psutil模块动态获取资源信息.下为示例图: #!/usr/bin/env python # -*- coding: utf-8 -*- # @Time: 2019- ...