[Git] 실수로 삭제한 저장소(repository) 를 복구하는 방법

soheeoott·2021년 6월 8일
1

Git

목록 보기
3/3
post-thumbnail

여기저기 흩어져있는 나의 저장소(repository)를 모아
새로운 저장소에 옮겨놓고 삭제 후 다른 저장소를 옮기려다
덮어쓰기가 되어 저장소(repository)가 날아가버렸다.

commit, push 취소는 많이 해봤지만 레포를 복구하는 방법은 뭘까 했는데,
GitHub 홈페이지에서 손쉽게 복구할 수 있다.

👉 GitHub 프로필

먼저 GitHub 프로필을 눌러 Settings 화면에 들어간다.

GitHub - Settings

좌측에는 Settings에 관한 목록들이 나열되어 있다.
이 중 Repositories를 클릭한다.

👉 GitHub - Settings - Repositories

branch 이름의 기본값을 설정하는 화면 하단에 저장소 목록이 있다.
삭제한 저장소를 모아놓은 목록 Deleted repositories를 클릭한다.



👉 GitHub - Settings - Repositories - Deleted repositories

삭제한 지 얼마 되지 않았다면 목록에 바로 나타나지 않으며,
포크를 하지 않은 저장소만 복원할 수 있다.



삭제한 저장소의 이름 옆에 Restore(복구) 버튼이 있다.



버튼을 누르면 정말로 복구할 것인지 묻는 확인 창이 나타난다.



진행중...


Done! 완료되었다.



📝 Reference

https://docs.github.com/en/github/administering-a-repository/managing-repository-settings/restoring-a-deleted-repository

profile
📚 글쓰는 습관 들이기 📚

3개의 댓글

comment-user-thumbnail
2022년 9월 23일

fd

1개의 답글
comment-user-thumbnail
2023년 9월 15일

와.. 진짜 감사합니다. 갑자기 파일 날라가서 .. 휴지통에도 없고 개멘붕 와있었는데, 잠깐 commit 테스트 했던 reopository가 생각나서 빨리 들어가봤는데 다행히 남아있었네요 ㅠㅠ

답글 달기