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

前端 未结 4 846
孤城傲影
孤城傲影 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:01

    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.

提交回复
热议问题