0

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.

kostix
  • 51,517
  • 14
  • 93
  • 176
Satish Kumar
  • 110
  • 1
  • 11
  • Possible duplicate of [Can you issue pull requests from the command line on GitHub?](https://stackoverflow.com/questions/4037928/can-you-issue-pull-requests-from-the-command-line-on-github) – phd Mar 20 '18 at 14:01

3 Answers3

2

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.

Mark Adelsberger
  • 42,148
  • 4
  • 35
  • 52
0

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.

DopplerShift
  • 5,472
  • 1
  • 21
  • 20
-1

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

then

git push origin "your_branch"

the pull request will be created in github

Saad
  • 73
  • 1
  • 8
  • sorry but it's not working, While running git add -p it's showing no changes, The second command is to commit but i don't have any staged changes then what i will be commiting ? – Satish Kumar Mar 20 '18 at 13:08
  • you should change your file and then do giit status and you will find changed files yiou want to make a pull request and your don't change any file !! – Saad Mar 20 '18 at 13:18
  • No, simple `push` doesn't automagically create a PR. You have to login to GH web interface and create a PR. And the question is — how to create a GH PR from the command line. – phd Mar 20 '18 at 14:03