Did you delete files, or commits?
If only the files are gone: git checkout <your local branch>
If this doesn't work, maybe git complains about unsaved changes, try this:
git checkout -f <your local branch>
or
git reset --hard
If commit disappeared, this gives you some kind of history of your previous git commands, with SHA1 number to commit that "disappeared": git reflog
. These commits are probably still accessible and you can try to run git checkout
on them.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…