git - Recover detached head commit -
this question has answer here:
- can recover branch after deletion in git? 14 answers
suppose following scenario.
create branch in local git repository on master branch.
checkout new branch , commits.
checkout master branch again.
delete newly created branch.
now, there way go last commit made in newly created branch if not remember commit id of it?
you can a:
git checkout head@{1}
or if use recent version of git:
git checkout -