LinuxCommandLibrary

git-rename-branch

Rename a Git branch locally and on the remote

TLDR

Rename current branch

$ git rename-branch [new_name]
copy
Rename specific branch
$ git rename-branch [old_name] [new_name]
copy

SYNOPSIS

git rename-branch [oldname] newname

DESCRIPTION

git rename-branch renames a branch both locally and on the remote. Part of git-extras, it handles the local rename and remote tracking update in a single command.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community