| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 | 31 |
Tags
- GitHub_Actions
- 백엔드 로드맵
- 엔티티 생명주기
- input
- static
- feignClient
- MIND 2023 #후기
- ci/cd
- Interface
- oAuth2
- 카카오인가코드받기
- jenkins
- 백엔드스쿨
- 어떤 개발자?
- html
- Docker
- Spring API
- 상속
- form
- 카카오인증토큰받기
- 백엔드공부
- 카카오사용자정보가져오기
- spring
- 엔티티 매니저
- 제로베이스
- Java
- 인스턴스
- button
- 예외
- tag
Archives
- Today
- Total
HiDevelop
Git Fork한 레포 최신화하기 본문
728x90
Fork한 레포에 지속적으로 contribution 해야해서, 최신화 하는 방법에 대해 기록할려고 합니다.
1. 원본 repository를 remote repository에 추가하기
git remote -v
위 명령어를 통해 현재 remote로 등록되어있는 repository를 확인한다. 대부분 아래와 같이 origin이 뜰 것입니다.
origin https://github.com/~~~~~~~/dasdsqwerapi.git (fetch)
origin https://github.com/~~~~~~~/dasdsqwerapi.git (push)
현재 remote repository에 연결되어있는 repo들 입니다.(보통은 자신의 github repo입니다.)
원본 repository를 remote repo에 아래 명령을 통해 추가할 수 있습니다.
git remote add upstream https://github.com/~~~~~~~/dasdsqwerapi.git
추가하고 난뒤 다시 git remote -v 명령어를 통해 확인하면,
origin https://github.com/~~~~~~~(자신 repo)/dasdsqwerapi.git (fetch)
origin https://github.com/~~~~~~~(자신 repo)/dasdsqwerapi.git (push)
upstream https://github.com/~~~~~~~(원본 repo)/dasdsqwerapi.git (fetch)
upstream https://github.com/~~~~~~~(원본 repo)/dasdsqwerapi.git (push)
요렇게 추가가 되어 있을겁니다. upstream이 원본 repo를 origin이 기존의 연결되어있던 remote repo입니다.
2. 최신화된 원본 repo 가져오기
이제 최신화된 원본 repo를 가져와야합니다. 원본 repo와 자신의 로컬 repo를 merge하여 줍시다.
git merge upstream/main
요렇게 하면, 원본 repo를 최신화할 수 있습니다.
728x90