Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitHub: How to add open pull requests to local repo?

Tags:

I'm using the NSDate-Extensions plugin in my iOS Xcode project. The master repo has some errors which seems to be fixed in two Pull Requests:

  • https://github.com/erica/NSDate-Extensions/pull/6
  • https://github.com/erica/NSDate-Extensions/pull/7

These requests are still open and not accepted to the master repo. How can I add these to my local repo in a Git-way? It would be fine, if my local repo gets update, if their Fork gets updated later:

  • https://github.com/Ricardo1980/NSDate-Extensions
  • https://github.com/exalted/NSDate-Extensions
like image 448
dhrm Avatar asked Jan 17 '12 08:01

dhrm


People also ask

Can I make a pull request to my own repository?

Go to your repository on GitHub and you'll see a button “Compare & pull request” and click it. Please provide necessary details on what you've done (You can reference issues using “#”). Now submit the pull request.

How do you raise a pull request in public repo?

Create Pull Request Now if you open a public repository you get this: After clicking on Compare & pull request you get: GitHub will alert you that you are able to merge the two branches because there is no competing code. You should add in a title, a comment, and then press the “Create pull request” button.


1 Answers

You can pull the requests from the command line without adding remotes:

git pull https://github.com/erica/NSDate-Extensions +refs/pull/6/head 

If you are not already sure you want to do that, then you might want to check out that branch first with:

git fetch https://github.com/erica/NSDate-Extensions +refs/pull/6/head:refs/origin/pull/6 

The advantage of this compared to using the patch files is that git gets the actual commits. So git can see when master was previously merged into the pull request. The patch file is completely unaware of such differences.

like image 74
JonnyJD Avatar answered Oct 28 '22 11:10

JonnyJD