码迷,mamicode.com
首页 > Windows程序 > 详细

【git】error: Your local changes to the following files

时间:2015-07-17 00:15:21      阅读:172      评论:0      收藏:0      [点我收藏+]

标签:

今天在服务器上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

标签:

原文地址:http://www.cnblogs.com/wubingshenyin/p/4652609.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!