好像你必须与github.com互动,发起拉请求。这样?

有帮助吗?

解决方案

<强>更新:本命令现在是一个官方的github项目,并且还支持创建拉请求

<强> ORIGINAL

似乎是一个特别有用的东西要添加到所述轮毂的命令: http://github.com/defunkt/hub 或GitHub的宝石: http://github.com/defunkt/github-gem

我建议提交与项目要求它的问题。 GitHub的人是相当敏感。

其他提示

GIT中现在一般与子命令'git request-pull' [-p] <start> <url> [<end>]

您可以看到文档这里

您可能会发现这个有用的,但它是不完全一样的GitHub的功能

使用的集线器命令行包装可以链接它与git然后就可以做 git pull-request

从轮毂的人页:

   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.

一个人搜索喜欢...

man git | grep pull | grep request

给出

git request-pull <start> <url> [<end>]

不过,尽管名称,这不是你想要的。根据该文档:

  

生成一个请求,要求你的上游项目拉变为   他们的树。该请求,打印到标准输出,便从   分公司介绍,总结了变化,并从那里他们指示   可拉

@HolgerJust 提到GitHub上的宝石,你想要做什么:

sudo gem install gh 
gh pull-request [user] [branch]

其他人已经通过github上提到的官方hub包:

sudo apt-get install hub

brew install hub 

然后

hub pull-request [-focp] [-b <BASE>] [-h <HEAD>]

我最终使我自己后,我发现它工作得更好那名周围的其他解决方案。

https://npmjs.org/package/pullr

我创建了一个工具,最近已经做了你想要什么:

https://github.com/jd/git-pull-request

它在一个单一的命令/自动一切,分叉回购协议,推动公关等,还支持更新PR,如果你需要编辑修复它!

我使用简单的别名来创建拉入请求,

alias pr='open -n -a "Google Chrome" --args "https://github.com/user/repo/compare/pre-master...nawarkhede:$(git_current_branch)\?expand\=1"'

在─尽管这似乎是需要有一个开放的问题首先,它是超级有用,真的,如果你使用GitHub的问题跟踪流线工作流程我已经使用这个工具。 Git的开放式,然后一拉请求从任何分支你或选择提交。 https://github.com/jehiah/git-open-pull

编辑:像你这样的外貌可以在飞行中产生问题,所以这个工具是一个很好的解决方案。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top