programing

git 저장 해제

elseif 2023. 4. 9. 21:07

git 저장 해제

내가 하지도 않은 프로젝트를 그냥 해놨어.보관하기 전에 주(州)로 돌아갈 수 있는 방법이 있나요?내가 어떻게 이럴 수 있지?터미널을 닫았고 노트북도 꺼졌어요.조사를 좀 해봤는데 방법이 없는 것 같아요.

실행할 수 있습니다.

git stash pop

그러면 변경 내용이 삭제됩니다.

파일 상태(스테이징 및 작동 상태)를 유지하려면

git stash apply --index

git stash list저장된 변경 사항을 나열합니다.

git stash show무엇을 보기 위해n는 다음 명령어에 있습니다.

git stash apply최신 저장 공간을 적용합니다.

git stash apply stash@{n}오래된 보관함을 적용합니다.

https://git-scm.com/book/en/v2/Git-Tools-Stashing-and-Cleaning

이렇게 하면 스테이징 디렉토리도 복원됩니다.

git stash apply --index

언급URL : https://stackoverflow.com/questions/10827160/undo-a-git-stash