Forrest logo
back to the gh tool

gh-pr-create:tldr:af687

gh-pr-create: Create a pull request, determining the title and description from the commit messages of the current branch.
$ gh pr create --fill
try on your machine

The command gh pr create --fill is used to create a pull request (PR) with pre-filled information in the command-line interface (CLI) tool provided by GitHub, called "gh" (GitHub CLI).

Here's a breakdown of the command:

  • gh: This is the command-line tool provided by GitHub, which allows you to perform various actions directly from your terminal.
  • pr create: This is a sub-command of the gh tool specifically used to create pull requests.
  • --fill: This is an option provided by the gh pr create command to automatically fill in certain details when creating a pull request.

When you run gh pr create --fill, it opens an interactive prompt where you can input the necessary information for creating the pull request, such as the title, body, base branch, and head branch. The --fill option fills in default values for these prompts, based on the current status of your local Git repository.

For example, the title may default to the name of the branch you're currently on, while the body could be populated with the latest commit message. These default values can simplify the process of creating a pull request, especially if you want to use consistent naming conventions or include relevant information in the pull request description.

By using gh pr create --fill, you can quickly create a pull request with some pre-filled information, making it more efficient to submit PRs from the command line.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the gh tool