git request-pull: how to create a (github) pull request on the command line?

前端 未结 3 1412
[愿得一人]
[愿得一人] 2021-01-01 14:34

I\'ve cloned a project, and pushed a branch with just a renamed readme file to README. I am trying to create a pull-request on the command line, just to try PR from here ins

相关标签:
3条回答
  • 2021-01-01 15:16

    Github has developed hub:

    hub is a command-line wrapper for git that makes you better at GitHub.

    which allows you to do that using

    hub pull-request
    

    Note that, unlike git request pull, this is the same as a pull request done via the web interface.

    Documentation for the hub pull-request command: https://hub.github.com/hub-pull-request.1.html

    0 讨论(0)
  • 2021-01-01 15:18

    With Github's new official CLI (command line interface):

    gh pr create --base master --title "My first cli PR" --body "What did I do?"
    

    See additional details and options and installation instructions.

    0 讨论(0)
  • 2021-01-01 15:40

    Even though they are called exactly the same thing, a GitHub pull request and a 'git request-pull' are completely different.

    The git request-pull is for generating a summary of pending changes to be sent to a mailing list. It has no integration by default with GitHub.

    The GitHub Pull Requests is a fully featured function of GitHub only. It allows for merging and integration of code from a different branch/fork. You can resolve merge conflicts, do code reviews, or add additional comments to a GitHub pull request.

    Unfortunately the git command is named similarly to GitHub functionality which makes it sound like they should be doing the same thing.

    0 讨论(0)
提交回复
热议问题