背景
几个月前,我开始使用 graylog2 并在我的公司内倡导使用它。事情进展顺利,我用(很少)时间阅读了我能找到的所有文档。
尽管如此,我还是设法为项目本身做出了贡献!
我发现了几个错误记录的功能和问题,并且我已经制作了 PR(已被组织接受)以在他们的几个项目中修复它们!
鉴于我的贡献意愿,他们给了我一个从零到英雄的机会——完成一个被放弃的 pull 请求:https://github.com/Wizcorp/node-graylog2
问题
这里的问题是我不知道如何在 github 中获得废弃 PR 的所有权。
根据我的阅读,没有“将此 PR 的所有权传递给其他人”功能。
我曾寻求帮助,但没有人回答。
我真的很想借此机会为社区做出贡献(有很多方法可以提供帮助!)但我不知道如何前进。
题
有人可以帮助我并告诉我如何获得废弃的 pull 请求的所有权吗?
最佳答案
你可以:
Wizcorp
作为远程 https://github.com/Wizcorp/node-graylog2 Wizcorp
: 这将包括 PR 分支。另见“Checking out pull requests locally” 那是:
git clone https://github.com/<you>/node-graylog2 # your fork of node-graylog2
cd node-graylog2
git remote add Wizcorp https://github.com/Wizcorp/node-graylog2
# replace ID with the old PR ID
# for instance: 22 for https://github.com/Wizcorp/node-graylog2/pull/22
# replace BRANCHNAME by a name representing the theme of your PR
git fetch Wizcorp pull/ID/head:BRANCHNAME
git rebase master BRANCHNAME
# commit
git push -u origin BRANCHNAME
在 GitHub 上,从你刚刚推送的分支创建一个新的 PR。
换句话说,您不拥有旧 PR 的所有权,您只需创建一个新分支,其中将包含旧 PR 提交和您的新提交。
您可以在 PR 消息中写下您的工作基于旧 PR。
关于git - 如何获得 pull 请求的所有权?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50781553/