1,先从git上pull(拉)代码。
我们本地进行了一些代码编辑。

图上红框为新增方法
2,使用git的stash Changes功能,如下图

3,查看本地代码变化,可以看到自己新加的方法没有了,又回到了从git上pull下来的最新状态

4,查看git的UnStash Changes功能

点击上图view,可以对比代码,点击 apply stash ,可以将stash的代码恢复到本地

到此这篇关于详解idea中Git的Stash Changes和UnStash Changes用法的文章就介绍到这了,更多相关Git Stash Changes和UnStash Changes用法内容请搜索脚本之家以前的文章或继续浏览下面的相关文章希望大家以后多多支持脚本之家!
您可能感兴趣的文章:- IDEA配置码云Gitee的使用详解
- 在IDEA(2020.2)中配置Git及使用Git的图文详解
- IDEA中git撤回上一次push的方法(指定回到某个版本)
- IDEA+Git+Gitlab使用详细教程
- IDEA中项目集成git提交代码的详细步骤
- 一文秒懂idea的git插件跟翻译插件