GitHub에서 협업을 위한 remote repository와 upstream 이해
보통 git remote add origin ...으로 origin을 직접 등록하라고 안내합니다. 여기서 말하는 origin이 깃허브에 존재하는 repository 즉, remote를 뜻하는 단어입니다. 다만 remote에 origin이라는 이름을 붙인 것뿐이랍니다.
upstream과 downstream은 상대적인 개념이라 origin과 local을 기준으로 생각하면 origin이 upstream, local이 downstream이 됩니다.
💡 다른 사람의 Github 저장소를 Fork한 경우 내 Github 저장소는 origin이 됩니다.
이 때 우리가 처음 fork를 시도한 저장소는 upstream 이라고 부릅니다.
origin과 upstream 모두 remote 저장소입니다. 보통 둘을 구분하기 위해 upstream이라는 명칭을 사용합니다
출처

git clone "복제한 내 레포지터리-url"
git add . && git commit -m "커밋 메세지"
git push origin [브랜치명]
반복
git remote add upstream "프로젝트 레포지터리-url"
git fetch upstream
git pull upstream [브랜치명]
git push origin [브랜치명]
GitHub에서 (upstream을 Fork한 내 저장소 <- upstream 저장소)로 Pull Request를 생성한 다음 내 저장소에 Merge한다.

Fork해온 저장소에서 Pull request나 Compare버튼을 누른다.

(Fork해온 내 저장소 <- 원래의 저장소)로 Pull request를 생성해서 Merge한다