
현재 fork를 한 내 레포지토리에는 없고, 오리지널 레포지토리
에만 있는 새로 생성된 브랜치
를 포크한 레포지토리로 가져오려고 한다.
git remote add upstream [원격 저장소 주소: https://github.com/familymoments/family-moments-BE.git]
// 오리지널 레포를 upstream으로 추가
git remote -v
// 잘 되었는지 확인
git fetch upstream [새로운 브랜치: featrue/commentUpload]
// 새로운 브랜치들을 upstream featrue/commentUpload 이런 식으로 가져옴
git checkout featrue/commentUpload
git push origin featrue/commentUpload
// 내 레포에도 반영
git remote remove upstream
// 원격 저장소 연결 끊기


참고 자료
https://maktubi.tistory.com/237
[Github] fork한 레포를 re-fork 하고 싶을 때 (오리지널 레포에 새로 추가된 브랜치 가져오기)
https://github.com/mijinkoo/2022-1-Euron-Study-Assignments GitHub - mijinkoo/2022-1-Euron-Study-Assignments: Euron 2기 스터디팀 예습·복습 과제 제출 Euron 2기 스터디팀 예습·복습 과제 제출. Contribute to mijinkoo/2022-1-Euron-Stud
maktubi.tistory.com
'Git' 카테고리의 다른 글
[Git] Github default branch 변경하기 (master to main) (0) | 2024.04.10 |
---|---|
[Git] 기존 프로젝트를 git repository에 연결하기 (0) | 2024.04.10 |
[Git] Github 한개의 repository에 여러 프로젝트 올리기 (0) | 2024.04.10 |
[Git] PR에 원치 않은 commit이 포함되는 문제 (0) | 2024.04.10 |