Satish Kumar
Satish Kumar

Reputation: 110

Can we create a pull request using command-line tooling?

As my browser was crashing I was not able to create a pull request from GitHub UI, I was trying to create a pull request from git console but didn't found any way to create a pull request.

I have also searched for the same over the net but most of the tutorials suggested to create a pull request from UIs only. I just want to be able to handle the pull request like creation, rejection, approved and merging without the browser. Please suggest.

Upvotes: 0

Views: 278

Answers (3)

DopplerShift
DopplerShift

Reputation: 5843

To open a pull request from the command line, you can install the hub set of command-line tools that GitHub supports. This will allow you to create a pull request from a repository with:

hub pull-request

I'm not aware of any similar tools for managing pull requests, though.

Upvotes: 0

Mark Adelsberger
Mark Adelsberger

Reputation: 45649

git and github are separate products. github is a service that happens to use git, but it is not part of git, its UI is not a git interface, and git does not have any special support for github functionality.

There is a little potential confusion here, because there are "pull requests" - an integrated feature of github having to do with branch workflow - and there is git request-pull, a seemingly lesser-known feature of git which creates a text message you could send to another repository maintainer to request that they pull changes from your repository.

Naming confusion aside, the "pull request" you want is a feature of github, not git; and so git itself (including git console and any git UI tool) have no command for this. You have to use a github-supplied interface, and AFAIK that means the web UI.

Upvotes: 2

Saad
Saad

Reputation: 73

git add -p then git commit -m "message"

then

git push origin "your_branch"

the pull request will be created in github

Upvotes: -1

Related Questions