How to open multiple pull requests on GitHub

后端 未结 6 1190
攒了一身酷
攒了一身酷 2020-12-07 13:43

When I open a pull request on GitHub.
All commits since my last request and all new ones are automatically added to this request

6条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-07 14:17

    You can create Pull Request(PR), by making separate branches for your work.

    Example:

    1. You checkout from a branch master into a branch work-1.

    2. You make some commits in branch work-1 as work-1-commit-1 and work-1-commit-2

    3. Now you create a PR from work-1 to master. Your code can be reviewed by seeing files changed from PR.

    4. Now, for further work you will checkout from branch work-1 into new branch work-2

    5. You make some commits in branch work-2 as work-2-commit-1 and work-2-commit-2

    6. Now you create a PR from work-2 to work-1. Your code can be reviewed by seeing files changed from PR.

    Here the files changes will only have the new code you write after work-1-commit-2.

提交回复
热议问题