So you lost your work while doing git stuff
- Do
git reflog
- Look through the commits
- Find your commit hash(e.g df57be3)
- Create a new branch with your lost commit,
git checkout -b recovery-branch df57be3
- Switch to your original branch and merge the recovery-branch in or cherry pick the commit you want.
> git switch original-branch
> git merge recovery-branch
🎉