似乎你必须与github.com交互来发起一个拉请求。是这样吗?
当前回答
使用Hub命令行包装器,您可以将其链接到git,然后就可以执行 git pull请求
从hub的手册页:
git pull-request [-f] [TITLE|-i ISSUE|ISSUE-URL] [-b BASE] [-h HEAD]
Opens a pull request on GitHub for the project that the "origin" remote points to. The default head of the pull request is the current branch. Both base and head of the pull request can be explicitly given in one of the following formats: "branch", "owner:branch",
"owner/repo:branch". This command will abort operation if it detects that the current topic branch has local commits that are not yet pushed to its upstream branch on the remote. To skip this check, use -f.
If TITLE is omitted, a text editor will open in which title and body of the pull request can be entered in the same manner as git commit message.
If instead of normal TITLE an issue number is given with -i, the pull request will be attached to an existing GitHub issue. Alternatively, instead of title you can paste a full URL to an issue on GitHub.
其他回答
我以前用过这个工具-虽然看起来需要先打开一个问题,但如果你使用github问题跟踪,它非常有用,真的简化了工作流程。Git打开拉取,然后从你所在或选择的分支提交一个拉取请求。 https://github.com/jehiah/git-open-pull
编辑:看起来你可以在飞行中创建问题,所以这个工具是一个很好的解决方案。
使用Hub命令行包装器,您可以将其链接到git,然后就可以执行 git pull请求
从hub的手册页:
git pull-request [-f] [TITLE|-i ISSUE|ISSUE-URL] [-b BASE] [-h HEAD]
Opens a pull request on GitHub for the project that the "origin" remote points to. The default head of the pull request is the current branch. Both base and head of the pull request can be explicitly given in one of the following formats: "branch", "owner:branch",
"owner/repo:branch". This command will abort operation if it detects that the current topic branch has local commits that are not yet pushed to its upstream branch on the remote. To skip this check, use -f.
If TITLE is omitted, a text editor will open in which title and body of the pull request can be entered in the same manner as git commit message.
If instead of normal TITLE an issue number is given with -i, the pull request will be attached to an existing GitHub issue. Alternatively, instead of title you can paste a full URL to an issue on GitHub.
除了github/hub,它作为Git的代理,你现在(2020年2月)有cli/cli:
参见“增强你的命令行体验:GitHub CLI现在处于测试版”
创建一个拉请求 创建一个分支,多次提交以修复问题中描述的错误,并使用gh创建一个拉请求来共享您的贡献。
通过使用GitHub CLI来创建拉取请求,当你还没有一个分叉时,它也会自动创建一个分叉,它会推送你的分支并创建你的拉取请求,以合并你的更改。
2020年4月:“GitHub CLI现在支持自动填充拉取请求和自定义配置”
GitHub CLI 0.7发布了我们beta版用户反馈的几个最受欢迎的增强功能。 自上一个小版本0.6以来,有三个主要特性: 将gh配置为使用gh配置集编辑器[editor]的首选编辑器。 配置gh默认为SSH,使用gh config set git_protocol SSH。 Git默认协议为HTTPS。 用gh pr create -fill自动填充你提交的pull请求的标题和正文。
So:
gh pr create --fill
最后我自己做了,我发现它比周围的其他解决方案更好。
https://npmjs.org/package/pullr
你可以安装github官方CLI来创建PR和做其他事情。
设置:
Gh auth登录
创建PR:
Gh pr创造
合并:
GH 公关合并
推荐文章
- 在Markdown Jekyll中使用图像说明
- 如何将git配置存储为存储库的一部分?
- 如何修改GitHub拉请求?
- 如何在Github和本地删除最后n次提交?
- 我如何调试git/git-shell相关的问题?
- 错误:无法使用rebase进行拉取:您有未分阶段的更改
- Git隐藏未缓存:如何把所有未分期的变化?
- 如何将文件附加到GitHub问题?
- 真实的恶魔
- 如何从另一个分支获得更改
- Git:权限被拒绝(publickey)致命-无法从远程存储库读取。克隆Git存储库时
- git reflog和log有什么区别?
- git推挂在Total line之后
- 重命名git子模块
- 如何添加谷歌分析跟踪ID到GitHub页面