文章作者: 微风–轻许–
文章連結: https://blog.youkuaiyun.com/misakaqunianxiatian/article/details/51103734
版權聲明: 著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
idea 上将本地代码推送到 git后 , 报错如下图

error: Your local changes to the following files would be overwritten by merge:
src/main/resources/application-prod.properties
Please, commit your changes or stash them before you can merge.
解决方法 :保留本地最新修改,并拉取仓库中忘记 pull 的代码到本地

三个命令
git stash
git pull origin master
git stash pop
当使用Git遇到推送代码时提示本地文件有未提交更改,需要先进行保存或暂存。通过`git stash`保存本地变更,`git pull origin master`拉取远程仓库更新,再用`git stash pop`恢复本地变更,即可成功合并代码。
8891

被折叠的 条评论
为什么被折叠?



