git pull之后提示Your local changes to the following files would be overwritten by merge
出现提示
Your local changes to the following files would be overwritten by merge
意味着本地修改的文件和你要拉取的文件有冲突。
那就要解决冲突。
1. git stash 先把当前的修改暂存起来 2. git pull 再拉取远程代码 3. git stash pop 将刚才的修改给恢复过来
这种修改方式同样适用于以下场景:
1.当前在0301分支进行开发,要立刻修复其他分支的bug
git stash list 查看
git stash apply恢复 但stash中内容不删除
git stash drop 删除
git stash pop 恢复的同时把stash内容也删除

浙公网安备 33010602011771号