728x90
목차
1. Pull request 하기
1. 저장소 clone 또는 pull
2. 브랜치 이동
브랜치가 없을 경우
git checkout -b 브랜치이름
브랜치가 있을 경우
git checkout 브랜치이름
3. git에 pull request 하기
git add .
git commit -m "message"
// 해당 브랜치가 이미 존재할 때
git push
// 오류 메시지 뜨면
git push --set-upstream origin 브랜치이름
// 해당 브랜치가 없을 때
git push origin 브랜치이름
// 헷갈리니까 merge할때마다 브랜치를 삭제하고
// git push origin 브랜치이름으로 하는 게 편할 것 같음..
4. github에 해당 저장소에 pull request로 이동
5. pull request에 없다면 오른쪽 상단에 New pull request 버튼 누르고
compare를 자신의 branch로 만들기
오른쪽 create pull request 누르면 pull request 생성됨
6. 오른쪽 Reviewers에서 팀원들 모두 추가
2. 리뷰 달기
1. Pull request에서 리뷰를 달 request로 이동
2. Files changed 클릭
3. 리뷰 달 line이나 여러 개의 줄을 누르고 + 클릭 후 리뷰 작성
4. 리뷰를 다 달면 finish your review 클릭
5. Pull Request 창에서 리뷰 확인 가능
3. 코드 리뷰 후 merge 및 브랜치 삭제
1. Merge pull request 누르면 저장소에 Merge 가능
2. 브랜치 삭제(하지 않아도 되지만 할 때마다 새로 만드는 게 편한 것 같음!)
git checkout main // 메인으로 이동 후 삭제
git branch -d 브랜치이름
728x90
'GitHub' 카테고리의 다른 글
[Github Actions] github actions로 Spring Boot secrets 관리 (application.yml) (0) | 2023.03.14 |
---|