恢复永久删除的文件夹 - git项目
我在工作的Git上结帐了一个特定的分支。 每次我进行一些更改时,我都会使用命令来推动并推动它们:
git push origin HEAD:master
今天,我删除了我从桌面上进行的项目,并试图用最后一个代码再次克隆回购。
当我访问仓库时,我意识到我要推动的所有工作都没有投入。有没有办法找到这些文件或从我的桌面恢复永久删除的文件?
我测试了一些工具(例如Stellar,recuva,磁盘钻,Windows File Recovery,Imyfone),没有成功:(
I had checkout a specific branch on git where I was working.
Each time I made some changes, I committed and push them using the command:
git push origin HEAD:master
Today, I deleted the project I was working on from my desktop and tried to clone again the repo with the last code.
When I visited my repo I realized that all the work I was pushing using the command above was not committed. Is there a way to find these files or recover permanently deleted files from my desktop?
I tested some tools (e.g. Stellar, Recuva, Disk Drill, Windows File Recovery, imyfone) without success :(
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的,事实证明(从您的评论中),当您推动时,您从服务器中拒绝了
更新
消息。好吧,当遥控器告诉您更新被拒绝时,这是一条消息,说您尝试推动的承诺实际上是从本地存储库推出到远程存储库。因此,本地存储库是唯一的位置。而且,由于您已删除了本地存储库,因此它们根本不存在。
Okay, so it turns out (from a comment of yours) that when you pushed, you got the
Updates were rejected
message from the server. Well, when the remote told you that the updates were rejected, that was a message saying that the commits you tried to push were not actually pushed from the local repo to remote repo.So the local repo was the only place where these commits existed. And since you deleted the local repo, they don't exist at all.