Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个本地分支工作,在那里我创建了两个新文件 a.py、b.py 并提交了它们。
然后,我没有做“git rebase origin/master”,而是不小心输入了“git rebase origin master”,现在我所做的提交已经消失了,文件也消失了。有谁知道如何恢复我的文件?
撤消 git rebase
Git 保留旧的 refs(直到你清理它们)。你可以从 rebase 之前切换回旧的 refs 就好了。