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 |
Tags
- 단축키
- 네트워크
- Eclipse
- GIT
- VirtualBox
- find
- import
- 줄바꿈 문자
- ssh
- bash
- plugin
- Windows 10
- vscode
- grep
- resource
- IntelliJ
- maVen
- xargs
- lsof
- profile
- Windows
- context
- JavaScript
- Source
- netsh
- tomcat
- port
- Quartz
- web.xml
- Mac
Archives
- Today
- Total
develog
[git] git repository 미러링하기 본문
복제할 리포지토리를 mirror clone 한다
## --mirror 대신에 --bare 를 사용한다
$ git clone --mirror git@github.com:userA/mirror-source-proj
$ git clone --bare git@github.com:userA/mirror-source-proj
복제한 리포지토리를 신규 리포지토리로 mirror push 한다
- push 하기 전에 신규 리포지토리를 먼저 생성한다
$ cd mirror-source-proj
$ git fetch
$ git push --mirror git@github.com:userB/mirror-target-proj
`git clone --mirror` 를 사용할 경우 아래 오류가 발생할 수 있음
! [remote rejected] refs/pull/1/head -> refs/pull/1/head (deny updating a hidden ref)
! [remote rejected] refs/pull/1/merge -> refs/pull/1/merge (deny updating a hidden ref)
원본 리포지토리와 미러 리포지토리 디렉토리 구조
Comments