Git 에서 유실된 commit 복원하기 - DanielWorld/SoftwareTech GitHub Wiki
: https://www.letmecompile.com/git-restore-lost-commits/
- 저장소 tree에 일반적으로 보이지 않는 모든 commit들을 살펴볼 수 있다.
git reflog
- 해당 유실된 커밋을 HEAD로 하는 tree로 돌려놓으려면 아래처럼 리셋 명령어를 실행하면된다.
git reset --hard {commitID}
- 해당 유실된 커밋만 현재 브랜치로 가져오려면 아래처럼 체리픽을 이용
git cherry-pick {commitID}