2016-11-25 66 views

回答

0

您可以使用Git的引用日志功能,这是一种所有的审计跟踪当你使用Git时发生的事情,包括提交。

git reflog --date=iso 

试图找到一个条目看起来像以下:

b28ae3b [email protected]{2016-11-25 15:54:53 +0800}: commit: message for the commit which you 
made earlier today 

如果你能找到的承诺,(在这个例子中b23ae3b)记录的SHA-1散列,因为你会需要它在提交时恢复你的分支。现在通过以下方式恢复您的分支:

git checkout yourBranch 
git reset --hard b28ae3b 
+1

我会尝试并回复 – aircraft