1.stash

通常遇到这个问题,你可以直接commit你的修改;但我这次不想这样。

看看git 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的哪些节点都消失了。

2.放弃本地修改,直接覆盖之

git reset --hard
    git pull
 
原文链接:https://blog.csdn.net/lincyang/article/details/21519333

Please, commit your changes or stash them before you can merge. Aborting的更多相关文章

  1. git pull冲突:commit your changes or stash them before you can merge.

    今天用git pull来更新代码,遇到了下面的问题: error: Your local changes to the following files would be overwritten by ...

  2. Git的commit your changes or stash them before you can merge

    今天用git pull来更新代码,遇到了下面的问题: error: Your local changes to the following files would be overwritten by ...

  3. Git冲突:commit your changes or stash them before you can merge.

    用git pull来更新代码的时候,遇到了下面的问题: error: Your local changes to the following files would be overwritten by ...

  4. Git冲突:commit your changes or stash them before you can merge. 解决办法

    用git pull来更新代码的时候,遇到了下面的问题: 1 2 3 4 error: Your local changes to the following files would be overwr ...

  5. git pull和git merge区别&&Git冲突:commit your changes or stash them before you can merge. 解决办法

    http://blog.csdn.net/sidely/article/details/40143441 原文: http://www.tech126.com/git-fetch-pull/ Git中 ...

  6. (转)Git冲突:commit your changes or stash them before you can merge. 解决办法

    用git pull来更新代码的时候,遇到了下面的问题: error: Your local changes to the following files would be overwritten by ...

  7. Please, commit your changes or stash them before you can merge

    参照 : https://blog.csdn.net/iefreer/article/details/7679631 用git pull来更新代码的时候,遇到了下面的问题: error: Your l ...

  8. Your local changes to the following files would be overwritten by merge: ... Please, commit your changes or stash them before you can merge

    Git出现error: Your local changes to the following files would be overwritten by merge: ... Please, com ...

  9. Git 解决方案 commit your changes or stash them before you can merge

    error: Your local changes to the following files would be overwritten by merge: *********** Please, ...

随机推荐

  1. FromServices回来

    FromServices回来 起因 这两天,我忽然有点怀念 Asp.NET MVC 5 之前的时代,原因是我看到项目里面有这么一段代码(其实不止一段,几乎每个 Controller 都是) [Rout ...

  2. pod install安装第三方库异常

    使用pod install安装第三方插件时,可能会出现如下异常: Installing SDWebImage (3.7.3) [!] Error installing SDWebImage[!] /u ...

  3. Memcached集群实现及原理介绍

    一.Memcached集群介绍 1.自身通过算法保证数据唯一性2.集群形式对用户和Memcached都是透明的3.Memcached的集群是通过客户端实现的4.Memcached服务端相互不认识 二. ...

  4. Node中导入模块require和import??

    转自:https://blog.csdn.net/wxl1555/article/details/80852326 S6标准发布后,module成为标准,标准的使用是以export指令导出接口,以im ...

  5. 在搭建Hadoop集群环境时遇到的一些问题

    最近在学习搭建hadoop集群环境,在搭建的过程中遇到很多问题,在这里做一些记录.1. SSH相关的问题 问题一: ssh: connect to host localhost port 22: Co ...

  6. EMR的fair-scheduler.xml

    cat /etc/ecm/hadoop-conf/fair-scheduler.xml <?xml version="1.0"?> <allocations> ...

  7. SrpingBoot入门到入坟01-HelloWorld和SpringBoot打Jar包

    第一个SpringBoot: 建立一个maven项目: 再pom.xml里面增加依赖: <?xml version="1.0" encoding="UTF-8&qu ...

  8. Erlang:[笔记二,构建工具rebar之发布应用]

    概述 通过rebar可以发布rebar构建的erlang项目,生成可执行的二进制脚本文件,大大降低了执行应用的复杂度.该笔记Erlang环境为Erlang/OTP 19 ,以下适用于Eralng/OT ...

  9. [NOIP普及组2001]最大公约数和最小公倍数问题

    目录 链接 博客链接 题目链接 题目内容 题目描述 格式 输入 输出 数据 样例 输入 输出 说明 题目名称:最大公约数和最小公倍数问题 来源:2001年NOIP普及组 链接 博客链接 CSDN 洛谷 ...

  10. Typora 的使用

    一. Typora的markdown语法 1.标题 使用简单的ctr+数字健,就可以快速完成各种级别的标题 #一阶标题 或者快捷键Ctrl+1 ##二阶标题 或者快捷键Ctrl+2 ##二阶标题 或者 ...