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

解决办法:

git status . 
git pull # 出现该提示 Please, commit your changes or stash them before you can merge.
git stash
git pull
git stash pop # 如果你用的是vscode的话,输完此行命令,出现比较文件,选择保留哪些,删除哪些.如果没有出现比较文件,继续往下
git status . 
git add .
git commit -m ""
git push

版权声明:本文为weixin_44984864原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。