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. 【ARM-Linux开发】TI 关于Gstreamer使用的几个参考

    http://processors.wiki.ti.com/index.php/Example_GStreamer_Pipelines#H.264_RTP_Streaming http://proce ...

  2. 原装win8系统电脑崩溃问题解决

    原装win8系统电脑崩溃问题解决 声明:引用请注明出处http://blog.csdn.net/lg1259156776/ 说明:之所以撰写本篇关于win8原装系统电脑崩溃的博文,一是要吐槽一下原装w ...

  3. 高级UI-RecyclerView拖拽和侧滑

    RecyclerView强大的地方在于高度的可定制,正式由于此优点,现在的项目大多使用RecyclerView,这里我们仿照QQ的功能,实现RecyclerView的拖拽和侧滑功能 功能说明 上下拖拽 ...

  4. ORA-12514错误分析

    ORA-12514 TNS 监听程序当前无法识别连接描述符中请求服务 的解决方法   ORA-12514 TNS 监听程序当前无法识别连接描述符中请求服务 有同事遇到这个问题,现总结一下,原因如下: ...

  5. python学习-45 模块

    模块 -----模块包括三种: ····python标准库 ····第三方模块 ····应用程序自定义模块 -------应用程序自定义模块 1.建立两个py文件,一个是定义函数用的cal.py de ...

  6. 20191011-构建我们公司自己的自动化接口测试框架-Util的读取excel常用方法模块

    包括获取excel的sheet名字,设定excel的sheet,读excel,写excel等常规操作. from openpyxl import Workbook from openpyxl impo ...

  7. 使用Duilib开发Windows软件(1)——HelloWorld

    我使用的是网易版本: https://github.com/netease-im/NIM_Duilib_Framework 时间是2019-11-28,作者最新的提交如下图: 运行官方示例程序 下载完 ...

  8. Linux Mysql 备份与还原

    1. 备份 cd /var/lib/mysql //进入到MySQL库目录 mysqldump -u root -p 数据库>/root/backup/数据库.sql 然后输入密码 2. 还原 ...

  9. 写文章 通俗易懂 悲观锁、乐观锁、可重入锁、自旋锁、偏向锁、轻量/重量级锁、读写锁、各种锁及其Java实现!

    网上关于Java中锁的话题可以说资料相当丰富,但相关内容总感觉是一大串术语的罗列,让人云里雾里,读完就忘.本文希望能为Java新人做一篇通俗易懂的整合,旨在消除对各种各样锁的术语的恐惧感,对每种锁的底 ...

  10. poj 3253 哈夫曼贪心

    http://poj.org/problem?id=3253 题意: FJ需要修补牧场的围栏,他需要 N 块长度为 Li 的木头(N planks of woods).开始时,FJ只有一块无限长的木板 ...