본문으로 바로가기

[GIT] Fork한 Repository 동기화

category TIL/GIT 2022. 5. 13. 16:10

1. 원본 Repository를 원격 Repository로 추가

git remote -v

 

2. 동기화하고 싶은 원본 Repository를 upstream이라는 이름으로 추가

git remote add upstream https://github.com/원본Repository.git

 

3. 추가되었는지 확인

git remote -v

 

4. upstream Repository로부터 최신 업데이트 가져오기

git fetch upstream

 

5. upstream Repository 브랜치를 로컬 브랜치로 merge

git checkout {로컬 브랜치명}

git merge upstream/{브랜치명}

 

6. Remote Repository에 적용

git push {원격 저장소명} {원격 브랜치명}

 


[ 출처 ]

https://json.postype.com/post/210431

'TIL > GIT' 카테고리의 다른 글

[Git] 기본 명령어  (0) 2022.05.13
[GIT] Git vs GitHub  (0) 2021.12.22