[英]How to restore files deleted by git pull rebase
在我執行git pull rebase
后,我的項目中的所有文件都發生了非常悲慘的事情。 我嘗試遵循此線程中的提示:
特別是第二種解決方案,我一直在嘗試:
grep -rin string_in_missing_file .git/
我在終端中看到這樣的結果:
.git//rebase-apply/0002:9609:+const ExplainSection = styled.div`
.git//rebase-apply/0002:9614:+const SectionNumber = styled.div`
.git//rebase-apply/0002:9621:+const SectionImage = styled.div`
.git//rebase-apply/0002:9626:+const SectionText = styled.div`
似乎有關我的文件的信息仍然在某個地方浮動,但是我不知道如何還原它們,甚至還無法恢復。
請在這里幫助我:(
檢查git reflog
以便您可以查看HEAD最近的git reflog
。 這樣,您可以將分支重置到以前的位置。 只要提交了這些文件,您就不會輕易丟失它們。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.