Forrest logo
back to the gh tool

gh-pr:tldr:73178

gh-pr: Edit the base branch of a pull request.
$ gh pr edit --base ${branch_name}
try on your machine

The command "gh pr edit --base ${branch_name}" is used to edit a pull request in a GitHub repository, where ${branch_name} is the name of the target branch or base branch for the pull request.

Here's a breakdown of each element in the command:

  • "gh" refers to the GitHub CLI (Command-Line Interface), a command-line tool provided by GitHub for interacting with repositories and other GitHub features.

  • "pr" stands for "pull request". This specifies that the command is related to managing pull requests in a GitHub repository.

  • "edit" is the action you want to perform on the pull request. In this case, you want to edit an existing pull request.

  • "--base" is an option that specifies the base branch of the pull request you want to edit. The base branch is the branch into which the changes should be merged. ${branch_name} is a placeholder for the actual branch name. You need to replace it with the name of the branch you want to set as the base for the pull request.

By executing this command, you can edit the base branch of a pull request, for example, if you want to change the destination branch for merging or update the pull request's target branch.

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