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.
保留服务器上所做的改动,并入新配置项, 使用方法如下:
git stash
git pull
git stash pop
然后可以使用git diff -w +文件名 来确认代码自动合并的情况.
希望用代码库中的文件完全覆盖本地工作版本. 采用方法如下:
git reset --hard
git pull
其中git reset是针对版本,如果想针对文件回退本地修改,使用
git checkout HEAD file/to/restore