Github for windows刚刚删除了我的所有文件

编程入门 行业动态 更新时间:2024-10-17 10:24:38
本文介绍了Github for windows刚刚删除了我的所有文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我只是想尽一切努力做好这件事,并将我的工作备份到github上,因为我在几个星期内没有做过提交工作。

我打开回购站,然后做了一个提交。

当我点击同步时,它会从磁盘上删除所有138个新文件,并在一个多月前重置为上次提交。它还覆盖了所有使用旧版本修改的现有文件。

我没有备份...这应该是fscking备份。

是否有一些magic git命令可以撤消这个shitstorm,或者我需要尝试使用文件取消删除工具来恢复新文件?

git reflog输出: 40847ec HEAD @ {0}:pull --progress --prune:快进 913f45e HEAD @ {1}:rebase:更新HEAD 02c93d0 HEAD @ {2}:rebase:放弃 02c93d0 HEAD @ {3}:commit:< - 上次提交良好

请帮忙!

解决方案

尝试调用 git reflog 。它应该显示最近提交的列表。你可以使用 git branch MyHappyBackUp< sha1> 其中< sha1> 是来自 git reflog 。如果您没有安装纯粹的git,请尝试此版本

I just tried to do the dutiful thing and backup my work to github, since I had not done a commit in a few weeks due to working on a large work area.

Github for windows notified me it needed to download the latest update and it did so.

I opened the repo, then did a commit.

When I hit sync, it deleted all 138 new files from disk and reset to the last commit more than a month ago. It also overwrote all existing files that were modified with the old version.

I have no backup... this was meant to be the fscking backup.

Is there some magic git command to undo this shitstorm, or will I need to try recover the new files with a file undelete tool ?

git reflog output: 40847ec HEAD@{0}: pull --progress --prune: Fast-forward 913f45e HEAD@{1}: rebase: updating HEAD 02c93d0 HEAD@{2}: rebase: aborting 02c93d0 HEAD@{3}: commit: <-- last good commit

Please help!

解决方案

Try to invoke git reflog. It should show you the list of recent commits. The you may use git branch MyHappyBackUp <sha1> where <sha1> is one of those commits from git reflog. If you don't have "plain git" installed, try this build

更多推荐

Github for windows刚刚删除了我的所有文件

本文发布于:2023-11-01 01:57:19,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1547915.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文件   Github   windows

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!