在我工作的Eclipse Kepler 4.3.2副本中安裝了Android工具之後,我強行刪除Eclipse並重新安裝它的地方出現了一些錯誤。我的工作空間受到了損害,甚至是我的git存儲庫被損壞了。如何在git中恢復文件歷史記錄
我有過去三週每天至少犯下一次的文件,他們被恢復到他們的第一個版本。這是災難的只是一個例子,其他的文件已損壞的歷史太,這個具體案例中說明如下
git log -p --follow PartyEvaluationModels/Resources/Rules/Person.d2wmodel
commit d48d3c9b7dbb8769278a70f1400947d87e7f0d6d
Author: Ângelo Andrade Cirino <>
Date: Tue May 13 15:11:20 2014 -0300
Tentativa de implementação com ERPartials e adição de arquivos de regras
para todas as entidades até agora definidas.
diff --git a/PartyEvaluation/Resources/d2w.d2wmodel b/PartyEvaluationModels/Resources/Rules/Person.d2wmodel
similarity index 100%
copy from PartyEvaluation/Resources/d2w.d2wmodel
copy to PartyEvaluationModels/Resources/Rules/Person.d2wmodel
commit 4d51eb3fa72fee750ba4b0a7e8c53216a9ea0b25
Author: Ângelo Andrade Cirino <>
Date: Thu May 8 23:17:01 2014 -0300
Funcionalidades para omitir atributos de entidades e abas de telas de
edição de entidades foram implementados com sucesso.
diff --git a/PartyEvaluation/Resources/d2w.d2wmodel b/PartyEvaluation/Resources/d2w.d2wmodel
index b6b1df4..7793fda 100644
--- a/PartyEvaluation/Resources/d2w.d2wmodel
+++ b/PartyEvaluation/Resources/d2w.d2wmodel
@@ -1,4 +1,4 @@
{
- rules = (
- );
-}
+ "rules" = (
+ );
+}
\ No newline at end of file
commit df14fc9d4dc2f811307b704f85d59b8cc8b0b9a7
Author: Ângelo Andrade Cirino <>
Date: Sun Mar 30 23:44:27 2014 -0300
Inserção do projeto Party
diff --git a/PartyEvaluation/Resources/d2w.d2wmodel b/PartyEvaluation/Resources/d2w.d2wmodel
new file mode 100644
index 0000000..b6b1df4
--- /dev/null
+++ b/PartyEvaluation/Resources/d2w.d2wmodel
@@ -0,0 +1,4 @@
+{
+ rules = (
+ );
+}
正如我所說的,這個文件是幾乎每天都承諾,現在它所有的歷史都是在本地和丟失GitHub也是如此。由於我的本地副本和GitHub失去了它的歷史記錄,我想我在幾個文件上失去了三個星期的工作。
如果有人幫我找到解決方法,我將非常感激。
嗨,thanx爲您提供幫助。我擁有這個回購,並沒有其他分支。我需要恢復的提交完全消失,無法找到。無論如何,具體文件提交似乎已從歷史記錄中隨機刪除,因爲我可以查看我的所有歷史記錄,但具體文件提交歷史記錄已重置爲隨機日期。就像我發佈的一個例子。 – Angelo
等待,如果你還有完整的歷史,你是如何失去數週的工作的?你可以在你的問題中添加'git status'和一個'git log --all --graph --decorate --pretty ='格式:%h%n%s''的樣本嗎? – Eevee