MGSplitViewController with all github patches?

牧云@^-^@ 提交于 2019-12-24 08:07:40

问题


I am interested in using MGSplitViewController but it seems that is has current bugs, especially when used in a tabbarController. I see that there are quite a few submitted patches on github for this. Is there a way to pull the files with all those patches? Or does someone have a branch that they are updating with all the new patches?

Thanks so much.


回答1:


The article "Quickly applying GitHub pull " details how to apply a pull request (which is at its core a patch)

See the patch and apply section of the Send Pull Request GitHub help

Another approach that’s a bit quicker in one-off cases is to use git-am.

Every pull request has a .patch URL where you can grab a textual patch file to feed into the git-am command:

In your case:

$ git checkout master
$ curl https://github.com/mattgemmell/MGSplitViewController/pull/43.patch | git am
$ git push origin master

Since you can list pull requests through the GitHub api, you can combine that in order to quickly apply all current pending pull requests.




回答2:


I created an answer for a similar question.

I use git-pull-request to get the list of open pull requests with <number>, <user> and <branch>. This can also be gathered manually at the web page of every request. Then I pull the corresponding github branches directly.

# pull request <number>
git pull https://github.com/<user>/MGSplitViewController <branch>

See Merging a pull request from the github help.


I don't like applying patches with https://github.com/<user>/<repo>/pull/<number>.patchwhen I have the repositories at hand. Especially since commit hashes can change using git am, which would "mess up" the github network view. See should-git-apply-or-git-am-come-up-with-the-same-hash



来源:https://stackoverflow.com/questions/7614494/mgsplitviewcontroller-with-all-github-patches

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!