Open Source Guide
  • 오픈소스 가이드
  • tools
  • SW360
    • How to install
    • Basic Workflow
  • FOSSology
    • 설치 방법
    • Basic Workflow
  • GitHub
    • Pull Request
  • Research
    • Contribution
      • 조직이 오픈소스에 투자해야 하는 다섯 가지 이유
      • 개발자가 오픈소스에 기여해야 하는 이유
    • Tools
      • License compliant containers (draft)
    • Compliance
      • Elastic License 2.0 배경
      • Docker containers : 오픈소스 라이선스 고려사항
      • 2019 FOSS Legal Issue Top 10
      • 소스 코드 내 저작권 표시를 해야 하는 이유와 올바른 방법
    • Security
      • OSS Supply Chain Security
Powered by GitBook
On this page
  • References
  • Step 1. Fork
  • Step 2. Clone
  • Step 3. Create a branch
  • Step 4. Keep your branch in sync
  • Step 5. Commit
  • Step 6. Push
  • Step 7. Create a pull request

Was this helpful?

  1. GitHub

Pull Request

PreviousGitHubNextContribution

Last updated 5 years ago

Was this helpful?

References

Step 1. Fork

Step 2. Clone

Fork한 Repository를 자산의 Local working directory로 Clone 한다.

$ mkdir -p $working_dir
$ cd $working_dir
$ git clone https://github.com/$user/[repository]
$ cd [repository]
$ git remote add upstream https://github.com/[upstream]/[repository]

# Confirm that your remotes make sense: 
$ git remote -v

Step 3. Create a branch

$ cd $working_dir/[repository]
$ git fetch upstream
$ git checkout master
$ git rebase upstream/master
$ git checkout -b myfeature

Step 4. Keep your branch in sync

# While on your myfeature branch
$ git fetch upstream
$ git rebase upstream/master

그 상태에서 code 작업을 한다.

Step 5. Commit

$ git commit -a -m '[commit message]'

Step 6. Push

myfeature branch의 수정 사항을 자신의 GitHub Repository에 Push한다.

git push -f origin myfeature

Step 7. Create a pull request

GitHub에서 자신의 Repository에 가면 Compare & pull request 버튼이 활성화 된 것을 볼 수 있다. 이를 눌러서 Pull Request를 생성한다.

이후 Upstream Repository의 관리자는 요청된 Pull Request를 검토하여 Merge 여부를 결정한다.

Upstream Repository를 자신의 GitHub 계정으로 한다.

Upstream Repository를 에 추가한다.

먼저 master branch를 fetch와 하여 최신 상태로 유지한다.

그리고 개발용 (myfeature)를 생성한다.

Branch를 fetch와 하여 최신 상태로 유지한다.

수정 사항을 한다.

Fork
Remote
rebase
branch
rebase
commit
https://github.com/kubernetes/community/blob/master/contributors/guide/github-workflow.md