天天看点

AndroidStudio使用git更新时代码丢失

在进行代码更新时出现update cancel的提示,并且自己辛苦撸的代码瞬间消失了,唯一欣慰的是还有警告

Local changes were not restored Before update your uncommitted changes were saved to stash.
Update is not complete, you have unresolved merges in your working tree
Resolve conflicts, complete update and restore changes manually.
           

失败的原因就是代码文件冲突,需要手动解决,修改的代码保存到stash库了,这就不怕了,找到他拉出来就好了。

vcs----------git----------------UnStash Changes

AndroidStudio使用git更新时代码丢失

找到自己需要的stash点击Apply Stash丢失的代码就回来了。