![]() |
![]()
| ![]() |
![]()
NAMEgh-pr-create - Create a pull request SYNOPSISgh pr create [flags] DESCRIPTIONCreate a pull request on GitHub. Upon success, the URL of the created pull request will be printed. When the current branch isn't fully pushed to a git remote, a prompt will ask where to push the branch and offer an option to fork the base repository. Use --head to explicitly skip any forking or pushing behavior. --head supports <user>:<branch> syntax to select a head repo owned by <user>. Using an organization as the <user> is currently not supported. For more information, see ⟨https://github.com/cli/cli/issues/10093⟩ A prompt will also ask for the title and the body of the pull request. Use --title and --body to skip this, or use --fill to autofill these values from git commits. It's important to notice that if the --title and/or --body are also provided alongside --fill, the values specified by --title and/or --body will take precedence and overwrite any autofilled content. The base branch for the created PR can be specified using the --base flag. If not provided, the value of gh-merge-base git branch config will be used. If not configured, the repository's default branch will be used. Run git config branch.{current}.gh-merge-base {base} to configure the current branch to use the specified merge base. Link an issue to the pull request by referencing the issue in the body of the pull request. If the body text mentions Fixes #123 or Closes #123, the referenced issue will automatically get closed when the pull request gets merged. By default, users with write access to the base repository can push new commits to the head branch of the pull request. Disable this with --no-maintainer-edit. Adding a pull request to projects requires authorization with the project scope. To authorize, run gh auth refresh -s project. OPTIONS
OPTIONS INHERITED FROM PARENT COMMANDS
ALIASESgh pr new EXIT CODES0: Successful execution 1: Error 2: Command canceled 4: Authentication required NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information. EXAMPLE$ gh pr create --title "The bug is fixed" --body "Everything works again" $ gh pr create --reviewer monalisa,hubot --reviewer myorg/team-name $ gh pr create --project "Roadmap" $ gh pr create --base develop --head monalisa:feature $ gh pr create --template "pull_request_template.md" SEE ALSOgh-pr(1)
|