使用git拉取代码时出现的问题


使用git pull拉取代码时报如下错误:

Your local changes to the following files would be overwritten by merge:
project.config.json
Please commit your changes or stash them before you merge.

如图:

原因:本地修改了一些文件,远程仓库中的这些文件也做了更改,两个文件中的内容不一致

解决方法:取消本地所有更改,命令:git stash

git stash #把所有没有提交的修改暂存到stash里面。可用git stash pop回复

如图:

 

 

然后再git pull拉取代码即可,如图:

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM