320x100
git저장소에 프로젝트 이름에 오타가 났다.
프로젝트 이름에 캘린더(Calendar)인데 Calandar라고 써버렸다.
프로젝트 이름을 변경하면서 기존 git의 remote도 다 변경하는 김에 git remote 명령어를 작성
1. 등록된 저장소 이름 출력
git remote
![[Git] Remote 명령어 모음 - undefined - 1. 등록된 저장소 이름 출력 [Git] Remote 명령어 모음 - undefined - 1. 등록된 저장소 이름 출력](http://t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png)
2. 저장소 이름 & URL 출력
git remote -v
![[Git] Remote 명령어 모음 - undefined - 2. 저장소 이름 & URL 출력 [Git] Remote 명령어 모음 - undefined - 2. 저장소 이름 & URL 출력](http://t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png)
3. 저장소 추가
git remote add [저장소 이름] [URL]
![[Git] Remote 명령어 모음 - undefined - 3. 저장소 추가 [Git] Remote 명령어 모음 - undefined - 3. 저장소 추가](http://t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png)
4. 저장소 이름과 branch 정보 출력
git remote show [저장소 이름]
![[Git] Remote 명령어 모음 - undefined - 4. 저장소 이름과 branch 정보 출력 [Git] Remote 명령어 모음 - undefined - 4. 저장소 이름과 branch 정보 출력](http://t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png)
5. 저장소 이름 변경
git remote rename [기존 저장소 이름] [변경할 저장소 이름]
![[Git] Remote 명령어 모음 - undefined - 5. 저장소 이름 변경 [Git] Remote 명령어 모음 - undefined - 5. 저장소 이름 변경](http://t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png)
6. 저장소 URL 변경
git remote set-url [저장소 이름] [변경할 URL]
![[Git] Remote 명령어 모음 - undefined - 6. 저장소 URL 변경 [Git] Remote 명령어 모음 - undefined - 6. 저장소 URL 변경](http://t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png)
7. 원격저장소 업데이트
확인을 위해 Git GUI에서 브랜치(new_branch)를 추가함.
git remote update
![[Git] Remote 명령어 모음 - undefined - 7. 원격저장소 업데이트 [Git] Remote 명령어 모음 - undefined - 7. 원격저장소 업데이트](http://t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png)
8.저장소 삭제
git remote rm [저장소 이름]
![[Git] Remote 명령어 모음 - undefined - 8.저장소 삭제 [Git] Remote 명령어 모음 - undefined - 8.저장소 삭제](http://t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png)
반응형
'프로그래밍 > Git' 카테고리의 다른 글
[Git] repo 사용하기(feat. git 여러개 설정하기) (0) | 2023.10.12 |
---|---|
[Git] 5. stash (0) | 2023.07.04 |
[Git] 4. branch(2) (0) | 2023.06.05 |
[Git] 3. branch(1) (0) | 2023.05.31 |
[Git] 계정 자동 로그인(feat. VSCode) (0) | 2023.05.29 |
댓글