Answer the question
In order to leave comments, you need to log in
I moved the branch to the previous commit and my last commit is gone. How to return it?
I made a commit. And then I moved the master branch to the penultimate commit. And the last one is gone (I use git in phpstorm - the last commit is gone from the list). How to return it?
Answer the question
In order to leave comments, you need to log in
1. View all commits:
git log --all
The top one, probably the one that disappeared. Remember his sha.
2.git checkout <memorized sha>
3.Migrate master to latest commit:
git merge master
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question