Your local changes would be overwritten by merge. Commit, stash or revert them to proceed.

时间:2024-04-02 08:16:15

前言

在切换分支拉取别人代码的时候,出现了这样一个拉取失败的错误,究竟如何解决呢,咱们继续往下说


一、问题所在

Your local changes would be overwritten by merge. Commit, stash or revert them to proceed.

二、解决步骤

1,将Stash修改存储起来

Your local changes would be overwritten by merge. Commit, stash or revert them to proceed.

注意:message里添加的是描述信息,方便查找
Your local changes would be overwritten by merge. Commit, stash or revert them to proceed.

2.pull

Your local changes would be overwritten by merge. Commit, stash or revert them to proceed.

注意:这是选择pull的分支,如下所示pull的是dev分支:
Your local changes would be overwritten by merge. Commit, stash or revert them to proceed.

3,合并分支并提交(一定要进行这一步,不然自己分支修改的内容将会被覆盖掉)

Your local changes would be overwritten by merge. Commit, stash or revert them to proceed.


总结

积累错误,积累经验,前方的路还很长