git报错处理记录

报错:Please, commit your changes or stash them before you can merge.

我的处理方法:

git reset --hard

git pull origin master

先重置放弃本地代码修改,再直接同步代码库的代码。