Git
简体中文 ▾ Topics ▾ Latest version ▾ git-request-pull last updated in 2.44.0

名称

git-request-pull - 生成待处理更改的摘要

概述

git request-pull [-p] <开始> <URL> [<结束>]

描述

Generate a request asking your upstream project to pull changes into their tree. The request, printed to the standard output, begins with the branch description, summarizes the changes, and indicates from where they can be pulled.

上游项目预计会有以 <开始> 命名的提交,输出会要求它通过访问以 <URL> 命名的仓库,整合您自该提交后所做的更改,直至以 <结束> 命名的提交。

选项

-p

在输出中包含补丁文本。

<起始>

Commit to start at. This names a commit that is already in the upstream history.

<URL>

要提取的仓库 URL。

<终止>

Commit to end at (defaults to HEAD). This names the commit at the tip of the history you are asking to be pulled.

当以 <URL> 命名的仓库的提交位于与本地仓库不同的引用的顶端时,可以使用 <本地>:<远程> 语法,以获得其本地名称、冒号 `:`和远程名称。

实例

Imagine that you built your work on your master branch on top of the v1.0 release, and want it to be integrated into the project. First you push that change to your public repository for others to see:

git push https://git.ko.xz/project master

然后,运行这条命令:

git request-pull v1.0 https://git.ko.xz/project master

会向上游发出请求,总结从 v1.0 版本到您的 master 版本之间的变化,以便从您的公共仓库中提取。

如果您将更改推送到的分支名称与本地分支不同,例如。

git push https://git.ko.xz/project master:for-linus

然后,您可以用

git request-pull v1.0 https://git.ko.xz/project master:for-linus

GIT

属于 git[1] 文档

scroll-to-top