今天在服务器上git pull是出现以下错误:

error: Your local changes to the following files would be overwritten by merge:

application/config/config.php

application/controllers/home.php

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

Aborting

不知道什么原因造成的代码冲突,处理方法如下:

如果希望保留生产服务器上所做的改动,仅仅并入新配置项:

git stash

git pull

git stash pop

然后可以使用git diff -w +文件名 来确认代码自动合并的情况.

如果希望用代码库中的文件完全覆盖本地工作版本. 方法如下:

git reset --hard

git pull

【git】error: Your local changes to the following files的更多相关文章

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

  2. 【转】Error: no `server' JVM at `C:\Program Files\Java\jre6\bin\server\jvm.dll'.解决办法

    出现问题: 用java -jar XXX.jar -server -Xms900m -Xmx900m 或者 java -server -version 提示错误 Error: no `server' ...

  3. 【Git】error: RPC

    摘要 git push throws error: RPC failed; result=56, HTTP code = 200的解决办法   原因 默认 Git 设置 http post 的缓存为 ...

  4. 【Git】error: RPC failed; HTTP 413 curl 22 The requested URL returned error:413 Request Entity Too Large

    error: RPC failed; HTTP 413 curl 22 The requested URL returned error:413 Request Entity Too Large fa ...

  5. Git pull error: Your local changes to the following files would be overwritten by merge:

    联合开发,遇上的一个问题,果然,在此验证了百度的不靠谱,是谷歌出的答案...... stackoverflow上有解决方案,链接:http://stackoverflow.com/questions/ ...

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

  7. 【Git】远程分支

    [Git]远程分支 转载:https://www.cnblogs.com/yangchongxing/p/10239270.html 目录 ============================ 1 ...

  8. 【Git】本地分支

    [Git]本地分支 转载:https://www.cnblogs.com/yangchongxing/p/10221382.html 目录 ============================== ...

  9. 【git】删除某个文件的所有历史记录,批量删除远程分支

    删除git某个文件的所有历史记录 git的目的就是版本控制,记录每一个版本的变动.然而有的时候我们往往希望从版本库中彻底删除某个文件,不再显示在历史记录中.例如不小心上传了一堆错误的文件,或者不小心上 ...

随机推荐

  1. Linux学习之fsck命令

    在windows下,磁盘的文件系统出错,需要运行chkdsk命令进行修复.而在linux下,则需要运行fsck命令.由于linux对于文件系统的错误非常敏感,由于意外断电或者其它原因导致linux系统 ...

  2. 碰到这个SB错误,'Taglist: Exuberant ctags (http://ctags.sf.net) not found in PATH. Plugin is not loaded.点办

    After launching MacVim you may get this annoying error message:'Taglist: Exuberant ctags (http://cta ...

  3. python super研究

    # encoding=utf-8 class A(object): def __init__(self): print "初始化a" def run(self): print &q ...

  4. nginx的conf文件的详细配置

    #定义Nginx运行的用户和用户组user www www; #nginx进程数,建议设置为等于CPU总核心数.worker_processes 8; #全局错误日志定义类型,[ debug | in ...

  5. C语言基础09

    指向结构体变量的指针叫做结构体指针: typedef struct { int num; char name[30];    // char *name; 程序会崩溃,*name本身是指针,没有什么空 ...

  6. UVA 1572 Self-Assembly

    拓扑排序,以边上标号为点,正方形为边,拓扑图中存在有向环时unbounded,否则bounded: 注意:仔细处理输入:   遍历一个点时,下一次遍历拼上的下一个方形边:即假设遍历到 A+ 时,下次从 ...

  7. Windows 10上快速尝鲜bash on Ubuntu

    今年微软Build 2016大会最让开发人员兴奋的消息之一,就是在Windows上可以原生运行Linux bash,对于非开发人员来讲,可能不知道这意味着什么,而对于开发人员来说,意味着Windows ...

  8. CSS 注意事项

    使用css缩写   使用缩写可以帮助减少你CSS文件的大小,更加容易阅读. 明确定义单位,除非值为0 忘记定义尺寸的单位是CSS新手普遍的错误.在HTML中你可以只写width="100&q ...

  9. Unix/Linux环境C编程入门教程(27) 内存那些事儿

    calloc() free() getpagesize() malloc() mmap() munmap()函数介绍 calloc(配置内存空间) 相关函数 malloc,free,realloc,b ...

  10. Eclipse 支持jQuery 自动提示

    1.下载jQuery文件 http://download.csdn.net/detail/emoven/6294377 2.设置spket Window -> Preferences -> ...