[英]How can I apply a pull request from the main project branch to my fork using the github UI or via command line?
I wish to apply this pull request我希望应用此拉取请求
https://github.com/MonoGame/MonoGame/pull/5114 https://github.com/MonoGame/MonoGame/pull/5114
to https://github.com/Danthekilla/MonoGame到https://github.com/Danthekilla/MonoGame
There doesn't seem to be a way to do this at first glance, is there a way to do it with TortoiseGit?乍一看似乎没有办法做到这一点,有没有办法用 TortoiseGit 做到这一点?
Perhaps some command like this?:也许是这样的命令?:
git merge https://github.com/Danthekilla/MonoGame https://github.com/MonoGame/MonoGame/pull/5114
You must specify the repository and branch to perform the pull request on when you originally create said pull request.当您最初创建所述拉取请求时,您必须指定存储库和分支来执行拉取请求。 AFAIK, there isn't any way to edit an existing pull request to do this.
AFAIK,没有任何方法可以编辑现有的拉取请求来执行此操作。
getbackbufferdata
)getbackbufferdata
)$ git checkout develop
$ git pull https://github.com/Jjagg/MonoGame/getbackbufferdata
( Caveat Emptor: I'm not 100% sure about the URL in the above command.) (警告 Emptor:我不是 100% 确定上述命令中的 URL。)
If you don't want to merge directly to the develop
branch, you can create a temporary branch to merge to.如果不想直接合并到
develop
分支,可以创建一个临时分支合并到。 For example例如
$ git checkout -b jjagg/getbackbufferdata develop
$ git pull https://github.com/Jjagg/MonoGame/getbackbufferdata
If you often need to pull from a GitHub repo which belongs to a fellow contributor, you can create a remote for said repo如果您经常需要从属于其他贡献者的 GitHub 存储库中提取,您可以为该存储库创建一个远程
$ git remote add jjagg https://github.com/Jjagg/MonoGame
Now you can pull directly from this remote现在你可以直接从这个遥控器拉
$ git checkout -b jjagg/getbackbufferdata develop
$ git pull jjagg getbackbufferdata
All of this is a little easier with command-line completion.通过命令行完成,所有这些都变得容易一些。 Once the remote is added, you can type
git pull j
then push Tab to complete the remote name.添加远程后,您可以键入
git pull j
然后按 Tab 来完成远程名称。 Then after git pull jjagg g
Tab again will complete the branch name.然后在
git pull jjagg g
Tab 之后再次完成分支名称。 If two branches start with g
, then a double Tab will show all possible choices.如果两个分支以
g
开头,那么双选项卡将显示所有可能的选择。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.