Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 |
Tags
- 스프링
- backjoon
- 백준
- 자료구조
- Oracle
- 네트워크
- baekjoon
- 데이터
- postgresql
- springboot
- Spring Security
- Flutter
- 리눅스
- 시큐리티
- 프로그래머스
- JPA
- 자바
- Java
- 스프링 부트 쇼핑몰 프로젝트 with JPA
- 데이터베이스
- CS
- DB
- 파이썬
- 자바스크립트
- python
- spring
- 스프링부트
- javascript
- 플러터
- CS지식
Archives
- Today
- Total
Jin's Dev Story
[GitHub] 저장소 repository 옮기기, 이동 (commit 포함) 본문
git repository mirroring
• git 저장소(repository)를 커밋로그 포함, 그대로 옮기는 방법
기존 Repository 복사
git clone 명령어에 --mirror 옵션을 추가해서 실행
$ git clone --mirror "기존 Repository 주소"
명령어를 실행하면 간략한 저장소로 복제한다고 하면서 Repository의 이름으로 .git 디렉터리가 생김 ( "기존 Repository".git ) 해당 디렉터리의 이름을 .git으로 바꾸어 주면 됨
$ mv "기존 Repository".git .git
새 Repository로 연결
git remote의 주소를 새롭게 옮길 Repository 주소로 변경
$ git remote set-url origin "새로운 Repository 주소"
해당 명령어를 실행한 후 정상적으로 변경이 되었는지 확인
$ git remote -v
새 Repository로 복사
git remote의 주소까지 변경이 되었다면 git push 명령어를 이용해 깃에 올려주면 됨 이때 옵션으로는 --mirror옵션을 추가
$ git push --mirror