0

假设我的 github repo X 有很多分支,其中一些具有非常好的新特性(=commits)。Afaik 如果没有来自 fork 所有者的 pull/merge 请求,就不可能将这些提交“获取”到我的 repo 中(但这不是我想要的。我想选择我需要的东西,而不是从其他用户那里获得请求)。

所以我的问题是:如何从我的 repo 的分支中获取提交到我的 repo 中?

4

1 回答 1

2

这些提交不在拉取请求中的事实不会阻止您将它们应用于您的分叉。您可以简单地将这些 fork 作为远程添加到您的 repo 中,然后从它们中进行cherry-pick/rebase/merge(选择正确的)提交。所以它只是:

git remote add nice-fork https://github.com/author/repo
git fetch nice-fork
#then the remote branches and commits are imported in your repo.

如果您想要的提交在拉取请求中,您也可以获取它们

于 2013-07-24T09:10:35.137 回答