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

前端 未结 4 760
孤城傲影
孤城傲影 2021-01-31 04:49

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/e
4条回答
  •  醉话见心
    2021-01-31 05:08

    You should add the forks that offered the pull requests, and add them as a remote:

    • Find the person contributing the link (normally just click the sha1 hash)

    • Do something like:

      git remote add githubuser theirgithubfork.git

    Then you can easily pull down their changes:

    • git fetch githubuser

    Easily take individual commits with"

    • git cherry-pick thesha1fromthepullrequest

    For a complete example, imagine this pull request (6bbbcc5) from RogerE on the Ruby Capistrano project.

    $ git clone git@github.com:capistrano/capistrano.git
    $ cd capistrano
    $ git remote add RogerE https://github.com/RogerE/capistrano.git
    $ git fetch RogerE
    $ git cherry-pick 6bbbcc5

提交回复
热议问题