-2

Suppose I make some changes to files, and commit and push the changes to a new branch which I push to github, i.e. something like this:

git commit -m "some changes"
git checkout -b testbranch
git push --set-upstream origin testbranch

Now I want to create a pull request from the command line. I tried

git request-pull testbranch git@github.com:alex4200/hello-world.git

but this says

warn: No match for commit a7c79dc732b3f00d6cf6ffe98e6c79de87110b7b found at git@github.com:alex4200/hello-world.git
warn: Are you sure you pushed 'HEAD' there?

But I see that commit on the github under the given branch with the given commit hash.

What do I misunderstand now?

Alex
  • 41,580
  • 88
  • 260
  • 469
  • 1
    Use the [PR API](https://docs.github.com/en/rest/reference/pulls) – Liam May 26 '21 at 14:43
  • @Liam I will try if it is not possible otherwise. But why does a command like `request-pull` exists in the first place then? – Alex May 26 '21 at 14:44
  • Worth noting that PRs are not a GIT thing. It's a workflow thing. GIT is source control not workflow – Liam May 26 '21 at 14:45
  • 1
    Because GIT has no concept of a PR. This is something in Github. A Pr is just a merge as far as GIT is concerned – Liam May 26 '21 at 14:45
  • @Liam Thanks for the info, however it does not work. I get the `message:Not found`. I guess I have yet to create another SO question... – Alex May 26 '21 at 14:50
  • https://stackoverflow.com/search?q=%5Bgithub%5D+pull+request+command+line – phd May 26 '21 at 14:51
  • https://cli.github.com/ , https://hub.github.com/ – phd May 26 '21 at 14:51

1 Answers1

4

What do I misunderstand now?

You have confused Git request pull with GitHub pull request.

Git request pull is literally a message to a friend requesting them to pull from you. It has nothing to do with GitHub.

You are looking for the hub tool:

https://hub.github.com/hub-pull-request.1.html

For installation instructions see

https://github.com/github/hub

matt
  • 515,959
  • 87
  • 875
  • 1,141