赞
踩
简介: 使用git pul
l出现error如下:其解决方法
error: Your local changes to the following files would be overwritten by merge:
xxx/xxx/xxx.java Please, commit your changes or stash them before you can merge. Aborting
git
十分常用命令:团队协作中,开发过程中,会经常遇到使用的命令
编程环境: deepin 15.11 x64 专业版
Kernel: x86_64 Linux 4.15.0-30deepin-generic
pull
更新代码,遇到了下面的问题:
error: Your local changes to the following files would be overwritten by merge:
xxx/xxx/xxx.java Please, commit your changes or stash them before you can merge. Aborting
解决方案:
git reset --hard
git pull
stash
git stash //保存贮藏
git pull //拉取
git stash pop //弹出贮藏 (此时会将更新的代码和自己写的代码合并,可能会有冲突,需要手动解决冲突)
因为有着许许多多的热心网友的无私分享,从他们的博客中学习成长,学会很多,故也不辞辛苦也将自己的项目或经验整理成博客的形式,也提供给一起大家学习探讨与交流
参考:
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。