그러니까 HEAD detached인 상황에서.
git reflog
를 사용하면 그 커밋을 찾을 수 있다.git branch <브랜치 이름> <해시>
로 브랜치를 하나 만들어서 잡으면 된다.
What happens to git commits created in a detached HEAD state? - Stack Overflow
What happens to git commits created in a detached HEAD state?
This is what happened: I have a branch A. On branch A I committed a bunch of changes. I was not happy with the code, so I checked out the previous commit in branch A. I then made a bunch more chan...
stackoverflow.com
지식이 늘었다.