Pull Request 하기

Ihwan Shin·2021년 3월 15일
0

git

목록 보기
5/5

Pull Request



순서

  1. Fork, clone
  2. remote 설정
  3. branch 생성
  4. 수정 작업 후 add, commit, push
  5. Pull Request 생성
  6. 코드리뷰, Merge Pull Reqest
  7. Merge 이후 branch 삭제 및 동기화


1. Fork, clone

타겟 프로젝트를 내 저장소로 Fork한 후,
이를 local repository로 clone한다.

2. remote 설정

git remote add < 타겟 별명 > < 타겟 프로젝트 Url >

3. branch 생성

git checkout -b < branchName >

4. 수정 작업 후 add, commit, push

git add .
git commit -m < commit message >
git push origin < branchName >

5. Pull Request 생성

푸쉬 후 본인계정 repository에서 pull request 생성 가능

6. 코드리뷰, Merge Pull Reqest

PR을 받은 원본 저장소 관리자는 코드 변경내역을 확인하고 Merge 여부를 결정한다.

7. Merge 이후 branch 삭제 및 동기화

git pull < 원본 별명 > master
git branch -d < branchName >

이후에는 3 ~ 7 반복






참조 - https://wayhome25.github.io/git/2017/07/08/git-first-pull-request-story/

profile
판교 주니어 개발자💻(since. 21/07/01)

0개의 댓글