Frage

I'm new to GitHub. Someone submitted a pull request with 5 commits. 3 of them have a little bug, though, so must wait. How can pick 2 of them for my project?

War es hilfreich?

Lösung

The ideal solution would be to leave a comment asking for the contributor to submit again his/her pull request with only the 2 commits, in order for you to apply said PR (pull request) without having to do any work.

The other solution, from the page "Merging Pull Request", is to merge locally, on your local clone, in a dedicated branch.
You can then cherry-pick the right commits you want, and push those back to your repo, but make sure to leave a comment in the discussion section of the pull request explaining that

  • you only took 2 of the 5 commits into account,
  • the contributor should rebase his work on top of your new updated master (which now includes said 2 commits), and re-submit the same pull request with the last (and hopefully fixed) 3 commits.

This is similar to the first option, except you don't have to wait for the fixes: you can grab what you want locally, test and push.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top