bash - 需要恢复桌面文件 - 使用 Git Bash 意外删除的桌面目录
问题描述
我是 Git 新手,我做了一些愚蠢的事情。
我从 GitHub 分叉了一个存储库,然后使用 Git Bash 将其克隆到我的计算机上。长话短说,我希望该目录在我的桌面上,但由于某种原因,我使用了rm -r Desktop
,现在我所有的桌面文件都不见了。
然后我将回购克隆到我的桌面,这是我在那里唯一的东西。我尝试关闭 Git Bash,因为我没有提交任何更改,但我的文件仍然不见了,我不确定该怎么做。
如何恢复我的桌面文件?我没有提交或推动或做任何这种性质的事情,所以我认为这些更改仍然是本地的。在此先感谢您的帮助!
解决方案
TestDisk is a tool for recovering files which have been deleted.
- Install testdisk
- nter
testisk
into the command line, and the utility will start. - Select your partition to search in.
- Select quick search or deeper search.
- testdisk will output which files have been recovered and then you can decide to recover or not.
A tutorial on testdisk at the following link, https://www.journaldev.com/36700/how-to-install-testdisk-on-linux-and-recover-deleted-files
推荐阅读
- soapui - Closing of a connection in WS-Security protected web service
- python - converting TXT to CSV python
- javascript - 有条件地在 html 中包含 JS 脚本
- c# - 以 net461 为目标,当 GET 请求有内容时,HttpClient 会抛出 ex,但适用于 netstandard2.0
- javascript - 从输入文本中读取变量并在新选项卡中打开而不发布表单
- r-markdown - 在 rmarkdown 中将希腊字母写到 docx(docx 的新命令)
- filter - 如何从 Vec 过滤值并仍然返回 Vec?
- java - GUI bug in JDialog box?
- css - 在 Stylus 中对媒体查询进行分组
- unreal-engine4 - 如何使用 C++ 从虚幻引擎设备访问 ID3D11DepthStencilView