Idea git local changes were not restore

2 篇文章 0 订阅

转:https://blog.csdn.net/wgy1160754366/article/details/69547491

https://www.oschina.net/question/948439_2231748

https://www.jianshu.com/p/dbcf28202d15?from=timeline

https://www.jetbrains.com/help/idea/2016.2/shelving-changes.html

要提交代码,先更新代码(Update project),然后再提交,这是平常一直使用的步骤。结果执行更新后,没有提示合并,把代码给我回退了到以前的版本了,在intellij 右下角提示了 Local changes were not restored

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

意思是:代码和服务器上的有冲突,合并失败了。未提交的更改被暂时保存到了stash (git的暂存区),要手动处理合并。

提交代码步骤:先commit到本地,再去pull代码,再push代码

 

stash 与 shelve区别:两个都是把代码搁置,只是 stash是git原生的。shelve是idea独有的。

 

  1. shelve存在当前项目下.idea/shelve里
  2. 查看shelve,打开version control面板,点开shelf
  3. unshelve,在面板里选择你需要unshelve的条目即可
  • 4
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值