Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to contribute code? #310

Closed
boandai opened this issue May 19, 2019 · 2 comments
Closed

How to contribute code? #310

boandai opened this issue May 19, 2019 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@boandai
Copy link
Contributor

boandai commented May 19, 2019

  • First from the remote repository https://github.com/apache/incubator-dolphinscheduler.git fork code to your own repository

  • there are three branches in the remote repository currently:

    • master normal delivery branch
      After the stable version is released, the code for the stable version branch is merged into the master branch.

    • dev daily development branch
      The daily development branch, the newly submitted code can pull requests to this branch.

  • Clone your own warehouse to your local

    git clone https://github.com/apache/incubator-dolphinscheduler.git

  • Add remote repository address, named upstream

    git remote add upstream https://github.com/apache/incubator-dolphinscheduler.git

  • View repository:

    git remote -v

There will be two repositories at this time: origin (your own warehouse) and upstream (remote repository)

  • Get/update remote repository code (already the latest code, skip it)

    git fetch upstream

  • Synchronize remote repository code to local repository

git checkout origin/dev
git merge --no-ff upstream/dev

If remote branch has a new branch such as DEV-1.0 , you need to synchronize this branch to the local repository.

git checkout -b dev-1.0 upstream/dev-1.0
git push --set-upstream origin dev1.0
  • After modifying the code locally, submit it to your own repository:

git commit -m 'test commit'
git push

  • Submit changes to the remote repository

  • On the github page, click on the new pull request.

  • Select the modified local branch and the branch to merge past to create a pull request.

  • Next, the Committers is responsible for merging to complete the pull request

  • 首先从远端仓库https://github.com/apache/incubator-dolphinscheduler.git fork一份代码到自己的仓库中

  • 远端仓库中目前有三个分支:

    • master 正常交付分支
      发布稳定版本以后,将稳定版本分支的代码合并到master上。

    • dev 日常开发分支
      日常dev开发分支,新提交的代码都可以pull request到这个分支上。

    • branch-1.0.0 发布版本分支
      发布版本分支,后续会有2.0...等版本分支,版本分支只修改bug,不增加新功能。

  • 把自己仓库clone到本地

    git clone https://github.com/apache/incubator-dolphinscheduler.git

  • 添加远端仓库地址,命名为upstream

    git remote add upstream https://github.com/apache/incubator-dolphinscheduler.git

  • 查看仓库:

    git remote -v

此时会有两个仓库:origin(自己的仓库)和upstream(远端仓库)

  • 获取/更新远端仓库代码(已经是最新代码,就跳过)

    git fetch upstream

  • 同步远端仓库代码到本地仓库

 git checkout origin/dev
 git merge --no-ff upstream/dev

如果远端分支有新加的分支比如dev-1.0,需要同步这个分支到本地仓库

git checkout -b dev-1.0 upstream/dev-1.0
git push --set-upstream origin dev1.0
  • 在本地修改代码以后,提交到自己仓库:

    git commit -m 'test commit'
    git push

  • 将修改提交到远端仓库

    • 在github页面,点击New pull request.

    • 选择修改完的本地分支和要合并过去的分支,Create pull request.

  • 接下来由管理员负责将Merge完成此次pull request

@boandai boandai added the help wanted Extra attention is needed label May 19, 2019
@boandai boandai pinned this issue May 19, 2019
@boandai boandai closed this as completed Jul 5, 2019
@davidzollo davidzollo mentioned this issue Aug 26, 2019
@Renkai
Copy link

Renkai commented Sep 17, 2019

项目似乎还没有配置持续集成,这样容易在合并提交时引入异常和不可用风险,建议配置
https://travis-ci.org/
来引入持续集成
@lenboo

@davidzollo davidzollo added this to Requirement(需求) in DolphinScheduler Work Plan via automation Sep 18, 2019
@chongchongzi
Copy link
Contributor

chongchongzi commented Sep 21, 2019

如何同时提交多个PR,我是在IDEA操作的
1、选中upstream/dev点击Checkout AS...
2、命名为你当次提交PR的功能名称,例如我的是添加http组件:dev-add-http-components
3、然后有两种场景:
一、你在当前分支开发代码:
(1)开发完代码,然后Commit and Push,值得注意的是:Push的时候需要改提交的分支为origin/dev-add-http-components
(2)最后在github页面,点击New pull request,选择修改完的本地分支和要合并过去的分支,Create pull request,就完成提交 PR了。

二、你在其他分支开发完代码:
(1)打开Version Control - Log ,选择其它分支提交的代码记录,点击Cherry-Pick,更新到本地,然后Commit and Push,值得注意的是:Push的时候需要改提交的分支为origin/dev-add-http-components
(2)最后在github页面,点击New pull request,选择修改完的本地分支和要合并过去的分支,Create pull request,就完成提交 PR了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants