github의 fork 기능은 저장소를 복사하는 기능입니다. 보통 작은 프로젝트를 진행 시 협업 할 때 초대를 통해서 권한을 얻을 수 있지만, 규모가 큰 오픈소스 프로젝트에 기여를 하기 위해서는 한명씩 초대를 통해서 권한을 받기에는 인원이 너무 많아서 불가능에 가깝습니다. 그래서 fork 기능을 사용해서 저장소를 복사하고 복사 된 저장소를 clone 기능을 통해서 로컬에 복사해서 기능을 추가하게 됩니다. 기능을 추가하고 fork한 저장소에 push를 하고 기여하기 버튼을 누르면 pull request 요청이 원본 저장소에 전달됩니다.
fork
fork로 원하는 저장소를 복사합니다.
clone

fork로 복사된 저장소를 clone해서 로컬에 복사하고 원본 저장소를 연결합니다. 원본 저장소(upstream)는 내가 fork한 저장소를 의미합니다.
원본저장소 pull

원본 저장소에 변경된 내용이 있으면 pull을 사용해서 가져올 수 있습니다.
기능추가 push
기능을 추가하고 fork로 복사한 저장소(origin)에 push를 합니다.
기여하기 pull request


fork로 복사한 저장소(origin)에서 pull request 요청을 합니다.


원본 저장소(upstream)에서 pull request를 확인하고 병합을 합니다.
'IT > Git' 카테고리의 다른 글
git rebase 충돌 해결 (0) | 2023.03.08 |
---|---|
git rebase 명령어 (0) | 2023.03.07 |
github pull request 사용법 (0) | 2023.03.03 |
github 초대하는 방법 (0) | 2023.03.03 |
Gist GitHub 사용법 (0) | 2023.03.02 |
댓글