gpt4 book ai didi

git - 使用 GitHub CLI 向上游提升 PR

转载 作者:行者123 更新时间:2023-12-05 04:58:22 25 4
gpt4 key购买 nike

如何从我的 fork repo 开发分支到上游 repo 开发分支提出 PR。我尝试了 gh pr create,但给出了以下输出/错误

$ gh pr create
Warning: 3 uncommitted changes

Creating pull request for development into development in upstream-repo-org/upstream-repo

? Title permission check for edit feature moved to parent components
? Body <Received>
? What's next? Submit
pull request create failed: GraphQL error: No commits between development and development

最佳答案

是的,已报告并紧随其后的是 cli/cli issue 1820 .

它源于new version 1.0.0 :

they have changed the implementation for gh pr create: #1706
Quote from the PR:

We no longer try to guess which is a suitable push target for the "head" branch.
Instead, unless the user has already fully pushed their branch, we always present the user with a prompt:
We never fork nor push without explicit user agreement anymore.

这也链接到 issue 1762 :“破坏行为改变:将主题分支推送到错误的远程”

正在进行 PR 以解决此问题:PR 1926: Fix pr create when branch was already pushed to a non-base remote .

Bonus: also proposes a new command stubber for tests, one that matches commands by their invocation instead of sequentially and also asserts that all stubs have matched at the end of the test.

这是用 gh 修复的1.1.0,带有 gh pr create

gh pr create \
--repo <[HOST/]OWNER/REPO>
--head <yourRepo>:<yourFeatureBranch> \
--base <The branch into which you want your code merged>

<xx>是一个要被替换的占位符(意味着在最后的命令中不应该有 <>)

关于git - 使用 GitHub CLI 向上游提升 PR,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64040150/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com