1 2 3 |
error: Your local changes to the following files would be overwritten by merge: custom/basicdata/dbschema/airport.php Please, commit your changes or stash them before you can merge. |
如果希望保留本地版本库所做的改动,仅仅并入新配置项, 处理方法如下:
1 2 3 |
git stash git pull git stash pop |
然后可以使用 git diff -w +文件名 来确认代码自动合并的情况.
如果希望用远程版本库中的文件完全覆盖本地工作版本. 方法如下:
1 2 |
git reset --hard //此命令有风险,操作请谨慎 git pull |
其中 git reset是针对版本,如果想针对文件回退本地修改,使用
1 |
git checkout HEAD custom/basicdata/dbschema/airport.php |