首页 > 其他分享 >git pull 拉代码冲突提示“error: Your local changes to the following files would be overwritten by merge:**.p

git pull 拉代码冲突提示“error: Your local changes to the following files would be overwritten by merge:**.p

时间:2022-08-21 13:56:12浏览次数:72  
标签:files pull git 代码 stash merge changes

git pull 拉代码冲突提示“error: Your local changes to the following files would be overwritten by merge:         practice/fun.py Please commit your changes or stash them before you merge.”

 

 原因是,本地代码有修改,git pull 拉代码,远程和本地代码有冲突,如果本地代码还未commit,可以用git stash 命令,先把自己的更改缓存起来。

 

 可以使用git stash list 命令查看缓存的list

缓存之后,可以使用git pull 拉最新的代码

 

 能成功拉代码,拉完代码,再用命令git stash pop释放本地更改缓存

 

 然后就可以继续码代码或者做commit ,push 等操作啦~~

标签:files,pull,git,代码,stash,merge,changes
From: https://www.cnblogs.com/szeto/p/16609890.html

相关文章