다른 브랜치에 커밋하기 위해 임시저장 해 둔 stash를 실수로 삭제한 경우...해결법
개발폴더에서 git bash 실행
다음 순서에 따라 원하는 stash를 불러옵니다.
삭제된 stash list 가져오기
git fsck --unreachable | grep commit | cut -d ' ' -f3 | xargs git log --merges --no-walk
삭제된 stash 복구하기
# git update-ref refs/stash [Commit Hash] -m "다시 저장할 Stash 이름"
git update-ref refs/stash b0d4c27a36e6729754a485b24ef18822ca42768e -m "recoverd stash"
복구한 stash가 보이지 않는 경우
# git update-ref refs/stash [Commit Hash] --create-reflog -m "다시 저장할 Stash 이름"
git update-ref refs/stash b0d4c27a36e6729754a485b24ef18822ca42768e --create-reflog -m "recoverd stash 1"
반응형
'백엔드' 카테고리의 다른 글
putty 폰트 크기 변경 (0) | 2023.08.31 |
---|---|
GET http://localhost:8083/Bizman/font/NANUMMYEONGJOBOLD.TTF net::ERR_ABORTED 404 에러 해결 (2) | 2023.08.30 |
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis (2) | 2023.08.24 |
MyBatis: Mapped Statements collection already contains value for ~ 에러 (0) | 2023.08.24 |
이클립스 서버 재시작 없이 jsp 수정 바로 반영 (0) | 2023.08.23 |