Skip to content

Instantly share code, notes, and snippets.

@devinschumacher
Last active September 13, 2024 15:31
Show Gist options
  • Save devinschumacher/bc66c162d9c6c167952f1943d0e6419c to your computer and use it in GitHub Desktop.
Save devinschumacher/bc66c162d9c6c167952f1943d0e6419c to your computer and use it in GitHub Desktop.
How to create a pull request (merge) in Github from the command line (without using the Github GUI or any apps)
title tags
How to create a pull request in Github from the command line (without using the Github GUI or any apps)
git

How to create a pull request in Github from the command line (without using the Github GUI or any apps)

The syntax:

$ gh pr create --base <branch-to-PR-into> --head <branch-youre-PRing> --title "<PR title>" --[body] "<Message body>"

Note: The body part is optional.

Example:

$ gh pr create --base dev --head cleanup --title "Merge cleanup branch" --body "A slew of commits first rodeo styling and housecleaning"

Creating pull request for cleanup into dev in serpcompany/serp-app

https://github.com/serpcompany/serp-app/pull/3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment