Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 43 additions & 5 deletions posts/principle/collaborate_using_github.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,52 @@

#### 1.2.2 브랜치 전략

내용 수정중...

#### 1.2.2.1 원격 저장소 Fork

----
공동으로 작업해올 저장소를 개인 저장소로 가져와야 합니다. fork의 경우 원격 저장소를 수정할 수 있습니다. 쉽게 설명드리면 프로젝트 저장소를 개인의 깃으로 가져오는 과정입니다. 이 과정을 거친 후에 로컬과 연결하는 작업을 진행할 수 있습니다. 프로젝트 저장소의 우측 상단부에 fork를 누른 후 개인 저장소로 복제해옵니다. 이를 공유 저장소라고 하겠습니다.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fork의 경우 원격 저장소를 수정할 수 있습니다.라는 멘트가 오해의 여지가 있는 것 같습니다.
fork를 하면 원격 저장소를 개인 저장소로 복사해오는 것이고 복사한 저장소를 수정할 수 있는 것입니다.
또한 복사한 저장소를 수정하고 수정된 내용을 원격 저장소에 Pull Request함으로 소스 메인테이너가 이를 반영할지 말지 반영할 수 있습니다.

이러한 맥락에서 해당 문구가 약간 오해의 소지가 있는 것 같은데 어떻게 생각하시는지요?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

차라리 쉽게 설명드리면 프로젝트 저장소를 깃으로 가져오는 과정입니다.라는 문구를 앞으로 댕기고 쉽게 설명드리면이라는 관용구를 제거해서 연결하면 조금 더 매끄러울 것 같습니다.

공동으로 작업해올 저장소를 개인 저장소로 가져와야 합니다. fork는 프로젝트 저장소를 개인의 깃으로 가져오는 기능입니다. 먼저 프로젝트 저장소의 우측 상단부에 fork를 누른 후 개인 저장소로 복제해옵니다. 이를 공유 저장소라고 하겠습니다.

너무 많은 정보를 포함하는 것보다는 핵심 정보를 간결하고 짧게 설명하는 게 좋다는게 제 의견입니다.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

최종적으로 검토하는 부분을 건너뛰어서 글이 지저분했던거 같습니다 수정하겠습니다

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

개인적으로는 예시 그림이 있으면 좋을 것 같습니다.
단순하게 글만 있으면 처음 보는 사람이 접근하기 어려울 것 같습니다.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵 추가하겠습니다


.... 작업 중.....
#### 1.2.2.2 깃 초기화 및 환경설정

공유할 저장소를 받아오기 위해서는 빈 디렉토리가 필요합니다. 새로운 폴더에 깃 저장소를 생성하고 개인저장소에서 공유저장소의 주소를 clone해옵니다.
Copy link
Contributor

@ssaru ssaru Nov 10, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

개인저장소에서 공유 저장소의 주소를 clone해온다는 말이 무슨 의미인가요?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

local repository랑 햇갈렸습니다 수정하겠습니다

**반드시 clone or download에 있는 주소를 가져오셔야 합니다.***
Copy link
Contributor

@ssaru ssaru Nov 10, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

**반드시 clone or download에 있는 주소를 가져오셔야 합니다.***

마지막에 *이 하나 더 붙어있습니다.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수정하겠습니다

또한 새로운 폴더와 프로젝트 저장소의 환경을 동일하게 하는 작업을 진행합니다.

순서는 다음과 같습니다.

1. 새로운 폴더를 만듭니다. 빈 폴더가 아니면 clone이 되지 않습니다.
2. 해당폴더에서 터미널로 **git init** 으로 저장소를 초기화 해줍니다.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

새로운 폴더에 깃 저장소를 생성하고, 개인 저장소에서 공유 저장소의 주소를 clone해오는 과정을 일련의 예제와 함께 설명하면 좋을 것 같습니다.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

사진 첨부해서 설명하는 방향으로 수정하겠습니다

3. 저장소를 만든 폴더에서 개인 저장소에 있는 공유 저장소를 가져옵니다. **git clone (clone에 있는 주소)** 으로 공유 저장소 정보를 가져옵니다.
4. 공유 저장소의 브랜치를 생성해줍니다. 보통 develop으로 이름을 지으며, 이는 프로젝트 저장소에서 풀리퀘를 할때 이름을 맞춰주셔야 실수로 merge하지 않기 위함입니다. **get add remote origin (공유 저장소 clone 주소)**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

공유 저장소, 개인저장소의 정의를 서두에 해줘야할 것 같습니다.
공유 저장소에 브랜치를 생성해주는 개념이 맞는 것인지 모르겠습니다.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

초심자가 이해하기 쉽고자 설명했던 개념이 오히려 오해를 만드는거같네요 전반적으로 수정하겠습니다

5. 프로젝트 저장소와 싱크를 맞추기 위해 upstream 브랜치를 추가합니다.
**git add remote origin (프로젝트 저장소 clone 주소)** 로 upstream 브렌치를 추가합니다.
6. **git remote -v** 명령어로 브랜치가 정상적으로 생성되었는지 확인해봅니다.
7. **git fetch upstream** 명령어로 프로젝트 저장소와 동일한 환경을 만들어줍니다. 이 과정을 생략하게되면 풀리퀘가 올라가도 정상적으로 등록할 수 없으니 필히 시행해주시기 바랍니다.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 부분은 저와 언제 한번 논의 한번 하시지요~

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵!


#### 1.2.2.3 파일 올리기 & commit 및 push

본인이 올릴 파일이나 폴더 디렉토리가 있을껍니다. 환경설정까지 진행한 폴더에 파일이나 폴더를 추가하고 이를 commit까지 하는 작업을 설명하겠습니다. commit은 되돌릴수 있으나, 작업을 간소화하기 위해 최대한 신중하게 해주는 편이 좋습니다. 실수했을 경우 환경설정부터 다시 다 해줘야 합니다.(commit을 취소했어도 git에서 새로운 파일을 인식하지 못하기 때문입니다.)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

해당 부분은 브랜치 전략 설명을 안하면 난해할 것 같습니다.


순서는 다음과 같습니다.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

전반적으로 회의 한번 하시죠~ :)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵 알겠습니다


1. **git checkout -b develop** 명령어로 작업할 브랜치로 돌아와서 작업을 시행합니다. master 브랜치로 작업을 시행할 경우 **바로 merge가 될 수 있으니 주의해주시기 바랍니다**.
2. 환경설정이 완료된 폴더에 소스코드 파일이나 폴더를 복사/이동 해줍니다. 위에서 강조한대로 새로 업로드한 파일을 **한번더 검토** 해주시는 것이 좋습니다.
3. **git status** 명령어로 확인을 해봅니다. 새로운 (파일/폴더) 을(를) git이 감지합니다.
4. **git add (올릴 파일이나 폴더)** 으로 업로드할 준비를 합니다.
5. **git commit** 명령어로 어떤점이 변경되었는지 등에 대한 작업내용을 표기합니다. commit -m "변경된 내용" 으로 작업을 간소화 할 수 있으니 참고 바랍니다.
6. commit이 정상적으로 되었는지 확인하기 위해 **git status** 으로 확인을 합니다. 이상이 없으면 **git push origin develop** 으로 공유 저장소에 수정사항을 반영합니다.

#### 1.2.2.4 프로젝트 저장소에 pull request 작성하기.

공유 저장소에 push를 했으면 공유 저장소에 develop 브랜치에서 프로젝트 저장소의 develop으로 pull request를 보낼 수 있습니다.

순서는 다음과 같습니다.

1. github.com으로 가셔서 본인의 공유 저장소로 접속합니다.
2. Compare & Pull request 버튼을 눌러 pull request 준비를 합니다.
3. Open a pull request 제목 밑에 프로젝트 저장소 브랜치와 공유 저장소의 브랜치가 보입니다. 두 브랜치를 develop으로 맞춰줍니다.
4. 제목과 내용을 기입하고 Create pull request를 눌러 작업을 마무리합니다.

### 1.1 프로젝트 시작

Expand All @@ -74,7 +113,7 @@

### 1.2 프로젝트 작업 방식

작업 목록은 프로젝트 회의를 통해서 결정됩니다. 결정된 작업은 Personal Remote Repository와 Personal Local Repository에서 하는 것을 목적으로 합니다.
작업 목록은 프로젝트 회의를 통해서 결정됩니다. 결정된 작업은 Personal Remote Repository와 Personal Local Repository에서 하는 것을 목적으로 합니다.



Expand Down Expand Up @@ -170,8 +209,7 @@
- 리뷰어에게 승인이 떨어지지 않으면 Merge를 금지합니다.



### Code Convention

- Coding Convention은 PEP8을 따릅니다.
- Git hooks를 이용하여 commit시, Code Convention을 충족시키는 방향으로 제한합니다.
- Git hooks를 이용하여 commit시, Code Convention을 충족시키는 방향으로 제한합니다.