Skip to content

Commit

Permalink
refactor pull request manual
Browse files Browse the repository at this point in the history
  • Loading branch information
javajigi committed Nov 21, 2017
1 parent b016262 commit cbf4ec3
Showing 1 changed file with 17 additions and 22 deletions.
39 changes: 17 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,60 +34,55 @@ ex) git checkout -t origin/javajigi
5. 기능 구현을 위한 브랜치 생성
```
git checkout -b 브랜치이름
ex) git checkout -b racingcar-step1
ex) git checkout -b step1
```

6. commit
```
git status //확인
git rm 파일명 //삭제된 파일
git add 파일명(or * 모두) // 추가/변경 파일
git commit -m "메세지" // 커밋
git commit -m "메시지" // 커밋
```

7. 본인 원격 저장소에 올리기
```
git push --set-upstream origin 브랜치이름
ex) git push --set-upstream origin racingcar-step1
git push origin 브랜치이름
ex) git push origin step1
```

8. pull request
* pull request는 github 서비스에서 진행할 수 있다.
* pull request는 original 저장소의 브랜치(자신의 github 아이디)와 앞 단계에서 생성한 브랜치 이름을 기준으로 한다.
8. github 서비스에서 pull request를 보낸다.
> pull request는 original 저장소의 브랜치(자신의 github 아이디)와 앞 단계에서 생성한 브랜치 이름을 기준으로 한다.
```
ex) code-squad/java-racingcar javajigi 브랜치 기준 => javajigi/java-racingcar racingcar-step1
ex) code-squad/java-racingcar javajigi 브랜치 기준 => javajigi/java-racingcar step1
```

9. code review 및 push
* pull request를 통해 피드백을 받는다.
* 코드 리뷰 피드백에 대한 개선 작업을 하고 다시 PUSH한다.
9. pull request를 통해 피드백을 받으면 코드를 수정한 후 같은 브랜치에 add, commit, push한다.

10. 기본 브랜치 전환 및 base 저장소 추가하기(최초 한번만)
10. 리뷰어가 피드백을 마무리하고 codesquad 저장소로 merge하면 작업 브랜치를 삭제한다.
```
git checkout 본인_아이디
git branch -d 삭제할_브랜치이름
git remote add upstream base_저장소_url
git branch -D 삭제할_브랜치이름
ex) git checkout javajigi
ex) git branch -d racingcar-step1
ex) git remote add upstream https://github.com/code-squad/java-racingcar.git
ex) git branch -D step1
```

위와 같이 base 저장소 추가한 후 remote 브랜치 목록을 본다.

11. merge한 codesquad 저장소와 동기화하기 위해 codesquad 저장소 추가(최초 한번만)
```
git remote add upstream base_저장소_url
ex) git remote add upstream https://github.com/code-squad/java-racingcar.git
// 위와 같이 base 저장소 추가한 후 remote 브랜치 목록을 본다.
git remote -v
```

11. base 저장소와 sync하기
12. base 저장소와 sync하기
```
git fetch upstream
git rebase upstream/본인_아이디
ex) git rebase upstream/javajigi
```

12. 5단계부터 다시 진행
13. 5단계부터 다시 진행


## 동영상을 통한 코드 리뷰() 를 통해 참고 가능
Expand Down

0 comments on commit cbf4ec3

Please sign in to comment.