Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I pull a not-yet-merged pull request? [duplicate]

Tags:

git

github

Example: https://github.com/BVLC/caffe/pull/1731

Sometimes I need to pull this kind of pull requests because I open an issue, and someone else provides a fix. Then the project collaborator may ask me to verify whether the fix works before his merging. So how to pull these pull requests instead of manually doing changes to my local repository?

like image 471
ziyuang Avatar asked Feb 06 '15 14:02

ziyuang


People also ask

Can you clone a pull request?

The changes you want can be got from the source of the pull request. To do this, clone the user's repository ( git://github.com/berstend/frappe.git ), and then check out the branch he created the pull request from ( feature/mongoose-support ).

Can I raise 2 pull requests from same branch?

You can create a new pull request that targets the first one, or work on an existing pull request and just continue working in the same branch. The existing pull request will pick up your commits once you push them.

Can I close pull request without merging?

You may choose to close a pull request without merging it into the upstream branch. This can be handy if the changes proposed in the branch are no longer needed, or if another solution has been proposed in another branch.

Does a pull request automatically merge?

With auto-merge, pull requests can be set to merge automatically when all merge requirements are met. No more waiting on slow CI jobs or tests to finish just so you can click the merge button!


1 Answers

You can fetch pull requests

git fetch origin pull/1731/head:shelhamer-cudnn-r2
git checkout shelhamer-cudnn-r2

and after testing, go back to master.

like image 182
Nils Werner Avatar answered Oct 02 '22 14:10

Nils Werner