[Git] Fork 해온 Repository 잔디 심는 방법

조진우·2022년 10월 24일
0

Github

목록 보기
1/2
post-thumbnail

Fork 해온 Repository에는 잔디가 심어지지 않는다. 잔디가 심어지는 기준은 다음 아래와 같다.

  1. Github 계정과 Commit 이메일 계정이 동일
  2. commit이 Fork한 repository가 아닌, 나만의 repository에서 이루어져야 한다.

Fork 해온 Repository의 commit 기록을 지우지 않고, 잔디를 심는 방법은 다음 아래와 같다.

1. 나의 Github에 새로운 Repository를 생성한다.

2. Terminal을 연다.

3. 복사하고자 하는 Repository를 bare clone 한다.

	$ git clone --bare https://github.com/exampleuser/old-repository.git

4. 새로운 Repository로 Mirror-push 한다.

아래 명령어를 이용하여 새로운 Repository로 이동하여, 새로운 Repository 주소를 복사한 뒤 git push mirror을 한다.

	$ cd old-repository.git
    
	$ git push --mirror https://github.com/exampleuser/new-repository.git

5. 처음에 임시로 생성했던 Local Repository는 삭제한다.

	$ cd ..

	$ rm -rf old-repository.git
    

참고자료


Fork 해온 Repository 잔디 심는 방법 (https://soranhan.tistory.com/11)

profile
The Top of Iceblog

0개의 댓글