GIT-PULL-REQUEST(1)

πŸ’– GIT-PULL-REQUEST(1) πŸ’–

okay bestie, welcome to the git-pull-request page from the Git Extras collection πŸŽ€ this is the one that yeets your local branch up to GitHub and opens a pull request for you, straight from the terminal, no browser tab hoarding required ✨


🌸 NAME 🌸

git-pull-request β€” create a pull request for a GitHub project 🫢


✨ SYNOPSIS ✨

git-pull-request [<branch>]

πŸ¦‹ DESCRIPTION πŸ¦‹

So like, you wanna open a pull request for a project on GitHub... from the command line? Say less. This command does exactly that πŸ’…

🚨 real talk though: you need a personal access token to hit the API and actually open the pull request(s) on GitHub. No token, no PR, no slay.

The API Documentation lives here, go peek if you're curious:

https://docs.github.com/en/rest/reference/pulls#create-a-pull-request

Also make sure your personal access token has the right OAuth scopes for the repo(s) you're touching β€” a token that can't scope is a token that can't serve, periodt 😭

Drop your token in one of these two ways:

  • Use the GITHUB_TOKEN environment variable, or
  • run git config --global --add git-extras.github-personal-access-token <your-personal-access-token>

And if you're juggling multiple accounts (main character with multiple identities fr fr), just override the global value in the specific repo like:

git config git-extras.github-personal-access-token <other-acc-personal-access-token>

πŸ’… OPTIONS πŸ’…

  • <branch> β€” the local branch to push and use as the pull request head. The base branch is prompted separately, so don't worry, it'll ask you 🌸

πŸ“ EXAMPLES πŸ“

$ git pull-request master
Everything up-to-date

  create pull-request for spacewander/spacewander-toolbox 'master'

  title: test
  body:
  base [master]:
  GitHub two-factor authentication code (leave blank if not set up):

...

πŸ‘‘ AUTHOR πŸ‘‘

Written by Tj Holowaychuk <tj@vision-media.ca> πŸ’–


πŸ™ˆ REPORTING BUGS πŸ™ˆ

<https://github.com/tj/git-extras/issues>


🌈 SEE ALSO 🌈

<https://github.com/tj/git-extras>


okay that's the whole page, you ate it 🫢 this was the May 2026 edition of the Git Extras man pages, GIT-PULL-REQUEST(1) β€” go open that PR, bestie, it's giving shipped πŸ’…βœ¨

πŸ“¦ where this page comes from