stander Qiu
stander Qiu

Reputation: 122

Undo git pull --rebase

Sorry for bothering everyone! Please help.

I wrongly used the git rebase --hard and overwrite all local files. Then I use git reflog and git reset --hard but did not find the former version! I searched for many questions but it seems that they only deal with git rebase without --hard.

How could I find the deleted files! Thanks!


I checked again and found that I used git pull --rebase. Sorry for misunderstanding.


Command sequences: git stash -> git pull --rebase -> git reset --hard with id (failed) -> git stash apply (succeed)

Upvotes: -1

Views: 508

Answers (1)

Maik Lowrey
Maik Lowrey

Reputation: 17556

If you did not use stash to take snapshots before the reset --hard, there is unfortunately nothing you can do to restore your lost working tree.

Upvotes: 3

Related Questions