Git Workflow(pair programming)

김보성·2021년 2월 23일
0

git

목록 보기
1/1

1. Both pairs fork repo on Github

해당 repository를 fork해서 나의 remote reposity로 가져온다.

2. Both pairs clone their repo to local

$ git clone (repository's https를 복사해서 붙여 넣기)

3. Add pairs fork as remote

$ git remote add (pair) (pair's repository 주소)

여기에서 pair도 다른 이름으로 설정할 수 있다. 그리고 그 페어의 repository 주소를 붙여 넣으면 된다.

4. Commit your change to your local repo

코드를 고치고 나서

$ git add (수정한 파일 이름)
$ git commit -m '(message)'

를 입력한다.

5. Push your code to your remote origin

$ git push origin master

여기에서 origin은 remote repository의 이름이고 master는 branch의 이름이다.

6. Pull pair's code to local repository

$ git pull pair master

페어의 코드를 local repository로 가져온다.

7. Commit pair's change to local repo

$ git add 페어가 고친 파일
$ git commit -m 'message'

다음 페어가 고친 코드를 커밋한다.

8. Push pair code to pair's remote origin

$ git push origin master

페어가 푸쉬해 remote repogitory에 올린다.

9. You pull lastest version of pair's code

$ git pull pair master

페어의 repogitory를 가져온다.

이와같은 과정을 반복한다.

profile
Boseong

0개의 댓글