Skip to content

gt rename

Rename the current branch.

Usage

gt rename <new-name>

Arguments

Argument Description
<new-name> New name for the branch

Examples

Basic Rename

gt rename feature/better-name

Behavior

  1. Renames the Git branch locally
  2. Updates Stack's tracking metadata
  3. If a PR exists, updates the PR's source branch (provider-dependent)

Remote Branches

Renaming does not automatically rename the remote branch. After renaming, you may need to push the new branch and delete the old one.