git pull更新错误解决办法
2016-04-13 17:59
399 查看
git pull更新错误解决办法
2016.3.26 16:06
Your local changes to the following files would beoverwritten by merge
error: Your local changes to the following files would be overwritten by merge:protected/config/main.php
Please, commit your changes or stash them before you can merge.
参考http://blog.csdn.net/zwhfyy/article/details/8625228
如果希望保留生产服务器上所做的改动,仅仅并入新配置项, 处理方法如下:
git stash
git pull
git stash pop
然后可以使用git diff -w +文件名 来确认代码自动合并的情况.
反过来,如果希望用代码库中的文件完全覆盖本地工作版本. 方法如下:
git reset --hard
git pull
2016.3.26 16:06
Your local changes to the following files would beoverwritten by merge
error: Your local changes to the following files would be overwritten by merge:protected/config/main.php
Please, commit your changes or stash them before you can merge.
参考http://blog.csdn.net/zwhfyy/article/details/8625228
如果希望保留生产服务器上所做的改动,仅仅并入新配置项, 处理方法如下:
git stash
git pull
git stash pop
然后可以使用git diff -w +文件名 来确认代码自动合并的情况.
反过来,如果希望用代码库中的文件完全覆盖本地工作版本. 方法如下:
git reset --hard
git pull
相关文章推荐
- protobuf 最新版本编译 Google Protobuf 3.0.1
- NSByteCountFormatter
- 团队计划会议 01
- 【DFS】HDU1016Prime Ring Problem
- 极光推送的使用过程
- 实例解析Ruby程序中调用REXML来解析XML格式数据的用法
- Servlet 过滤器(filter)和Spring 拦截器(Interceptor)区别
- Spark On YARN 集群安装部署
- Context.getExternalFilesDir()和Context.getExternalCacheDir()方法
- 会场安排问题
- Centos7最小化安装之后,需要做那些事情?
- html学习之路——第一天(2)
- 关于java、Android中Math的一些用法
- android 电容屏(三):驱动调试之驱动程序分析篇
- CSS让PRE标签强制换行
- centos7使用devstack安装openstack mitaka
- 127.0.0.1和本机ip区别
- reservoid sample 蓄水池问题
- 用python导入mysql
- Redis实现秒杀系统