Github提交并同步删除所有文件 - 所有工作都会丢失 [英] Github Commit and Sync Deleted All Files - All work lost

查看:226
本文介绍了Github提交并同步删除所有文件 - 所有工作都会丢失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Sublime文本和Github插件。

当我尝试提交并同步时,它将所有文件恢复为联机版本(从三天以前)。



提交没有显示在历史记录中。



有什么方法可以取回我的档案? 解决方案

问题是,您可能没有在修改索引之前加入修改:




  • 你的提交(它没有提供任何结果)和
  • 你的同步您的索引到最新提交的提交)



如果遇到问题,最好回退到命令行并检查:




  • git status 可以查看您目前在同步之后的位置,

  • git reflog ,查看是否有任何带有时间戳的旧提交,可能表明您提交了一个。

  • git fsck --fu ll --unreachable --no-reflog ,以查看如果您已将任何内容添加到索引中已恢复


I am using Sublime text and a Github plugin.

When I tried to Commit and Sync it reverted all my files to the version in the online (from three days ago).

The commit is not showing up in the history.

Is there any way that I can get my files back?

解决方案

The problem is that you might not have added your modification to the index before making:

  • your "commit" (which committed nothing as a result) and
  • your sync (which might have reset your index to the latest fetched commit)

It is always preferable, in case of trouble, to fallback to the command line and check:

这篇关于Github提交并同步删除所有文件 - 所有工作都会丢失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆