|
| 1 | +# ‘모두가 만드는 모두를 위한 딥러닝’ 참여 방법!! (Contribution) |
| 2 | + |
| 3 | +## Precheck steps : 사전 확인 |
| 4 | + |
| 5 | +* 작업을 시작하기 전에 먼저 이슈를 남겨 두세요. 왜냐면 |
| 6 | + * 여러분이 무엇을 하고 있는지 사람들에게 알리는 데 도움이 됩니다. |
| 7 | + * 제안하는 문제가 이 Repo와 무관할 수 있습니다. |
| 8 | + * 그런 방식으로 코드를 유지하는 게 우리의 의도일 수도 있습니다. ([KISS](https://en.wikipedia.org/wiki/KISS_principle)) |
| 9 | +* 여러분은 Git을 어떻게 사용하는지 알아야합니다. |
| 10 | + * 그렇지 않다면, "Git 사용 방법"을 검색한 후, 무언가를 하기 전에 그것들을 읽어 보세요. 개발자로서 살아남기 위해서는 필수적인 기술입니다. |
| 11 | + * [Git tutorial](https://try.github.io/levels/1/challenges/1)을 참고하세요. |
| 12 | + |
| 13 | +## Contribution guidelines |
| 14 | + |
| 15 | +이 문서는 Contribution 프로세스를 안내합니다. |
| 16 | + |
| 17 | +### Step 1: Fork |
| 18 | + |
| 19 | +Fork 버튼을 눌러 [GitHub](https://github.com/deeplearningzerotoall/PyTorch.git)에 프로젝트를 Fork하세요. 이 단계는 작업을 시작할 수 있게 여러분의 계정에 복사하게 됩니다. |
| 20 | + |
| 21 | +### Step 2: Local computer에 다운로드하세요 |
| 22 | + |
| 23 | +```bash |
| 24 | +$ git clone https://github.com/`YOUR_GITHUB_NAME`/PyTorch.git |
| 25 | +$ cd TensorFlow |
| 26 | +``` |
| 27 | + |
| 28 | +### Step 3: Setup an upstream |
| 29 | + |
| 30 | +변경 사항이 있을 경우, 쉽게 Pull할 수 있도록 이 Repo에 대한 링크를 설정해야 합니다. |
| 31 | + |
| 32 | +```bash |
| 33 | +$ git remote add upstream https://github.com/deeplearningzerotoall/PyTorch.git |
| 34 | +``` |
| 35 | + |
| 36 | +저장소에 업데이트가 있는 경우 로컬 복사본과 repository 를 업데이트할 수 있습니다. |
| 37 | + |
| 38 | +```bash |
| 39 | +$ git pull upstream master && git push origin master |
| 40 | +``` |
| 41 | + |
| 42 | +### Step 4: Make a branch |
| 43 | + |
| 44 | +Master branch는 Pull Request들을 계속 병합되고 수정되기 때문에 Master branch를 직접 수정하지는 않는 게 좋습니다. |
| 45 | + |
| 46 | +그리고 의미 있는 이름으로 Branch를 만드는 걸 잊지마세요! |
| 47 | + |
| 48 | + |
| 49 | +Example: |
| 50 | +```bash |
| 51 | +$ git checkout -b hotfix/lab10 -t origin/master |
| 52 | +``` |
| 53 | + |
| 54 | +새로운 Branch를 만든 후에 자유롭게 코드를 수정하세요! |
| 55 | + |
| 56 | +**주의: 여러분 제안한 Issue와 관련이 없는 다른 것들을 고치고 마세요!** |
| 57 | + |
| 58 | +만약에 다른 문제가 있다면, 따로 이슈를 제안하시길 바랍니다. |
| 59 | + |
| 60 | +### Step 5: Commit |
| 61 | + |
| 62 | +이메일/사용자 이름을 설정하세요. |
| 63 | + |
| 64 | +```bash |
| 65 | +$ git config --global user.name "Sung Kim" |
| 66 | +$ git config --global user.email "[email protected]" |
| 67 | +``` |
| 68 | + |
| 69 | +그리고 필요한 파일을 추가 후, Commit 하세요. |
| 70 | +```bash |
| 71 | +$ git add my/changed/files |
| 72 | +$ git commit |
| 73 | +``` |
| 74 | + |
| 75 | +Notes |
| 76 | +* 다른 사람들도 알아 볼 수 있게 명확한 Commit 메시지를 쓰세요! |
| 77 | + |
| 78 | +* 예시: |
| 79 | +```text |
| 80 | +Short (50 chars or less) summary of changes |
| 81 | +
|
| 82 | +More detailed explanatory text, if necessary. Wrap it to about 72 |
| 83 | +characters or so. In some contexts, the first line is treated as the |
| 84 | +subject of an email and the rest of the text as the body. The blank |
| 85 | +line separating the summary from the body is critical (unless you omit |
| 86 | +the body entirely); tools like rebase can get confused if you run the |
| 87 | +two together. |
| 88 | +
|
| 89 | +Further paragraphs come after blank lines. |
| 90 | +
|
| 91 | + - Bullet points are okay, too |
| 92 | +
|
| 93 | + - Typically a hyphen or asterisk is used for the bullet, preceded by a |
| 94 | + single space, with blank lines in between, but conventions vary here |
| 95 | +``` |
| 96 | + |
| 97 | +### Step 6: (Optional) Rebase your branch |
| 98 | + |
| 99 | +수정이 평소보다 더 오래 걸려서, 여러분의 레포지토리는 뒤쳐진 옛날 버전일 가능성이 높습니다. 항상 레포지토리를 최신 버전으로 동기화하세요. |
| 100 | +```bash |
| 101 | +$ git fetch upstream |
| 102 | +$ git rebase upstream/master |
| 103 | +``` |
| 104 | + |
| 105 | +### Step 7: Push |
| 106 | + |
| 107 | +여러분의 repo를 push하기전에 ‘Autopep8’을 실행해주세요! |
| 108 | + |
| 109 | +E501(최대 문자 줄 제한)을 제외한 모든 PEP8형식을 따라주세요. |
| 110 | + |
| 111 | +**잊지마세요, 가독성이 최우선입니다!** |
| 112 | + |
| 113 | +* 예시: |
| 114 | + |
| 115 | +```bash |
| 116 | +$ autopep8 . -r -i --ignore E501 |
| 117 | +$ git push -u origin hotfix/lab10 |
| 118 | +``` |
| 119 | + |
| 120 | + |
| 121 | +### Step 8: Creating the PR |
| 122 | +이제 여러분의 브라우저와 repo를 열면 "compare & pull request."라는 초록색 버튼을 보실 수 있습니다. |
| 123 | + |
| 124 | +* 좋은 제목을 작성하세요. |
| 125 | +* 여러분이 수정한 파일 이름만 쓰지마시고 자세하게 설명해주세요. |
| 126 | +* **여러분이 했던 것과 여러분이 왜 했었는지를 설명해주세요.** |
| 127 | +* 관련된 issue번호도 추가해주세요. |
| 128 | + |
| 129 | +축하합니다! 여러분의 PR은 Collaborator들에게 검토받을겁니다. |
| 130 | +여러분의 PR이 CI Test도 통과했는지 체크하세요. |
| 131 | + |
0 commit comments