简体   繁体   中英

github - how to divert commits to another pull request from the same branch

In a Github pull request, it says Add more commits by pushing to the XYZ branch on ABC

Without creating a new branch and before closing current pull request, is it possible to push new commits from XYZ branch to a new pull request that I open?

Or will all pushes from XYZ go into currently open pull request?

In short: 1) no. 2) yes.

Pull requests (or merge requests) are based on changes between branches. You're asking the maintainer to merge the changes made in said branch to the upstream branch. If you push commits to the branch you're asking for them to be merged as well. Those commits will also appear in the pull request because it is added to the difference between the two branches.

If you create another pull request with the same branch, the same changes will be shown for both pull requests. You're better off creating separate branches per pull request.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM