git-rename-branch(1)

git-rename-branch1

Rename local branch and push to remote

Usage

git-rename-branch <old-branch> <new-branch>

Overview

Rename local branch and push the new branch to remote

Options

&lt;old-branch&gt;
Old branch whose has to be renamed. This is an optional parameter. If no value is supplied then the current branch will be renamed.
&lt;new-branch&gt;
New branch name

Examples

$ git rename-branch old-name new-name
$ git rename-branch new-name

Releases

5 releases since Debian 9 (Stretch); the text changed 4 times.

  1. 9
  2. 10
  3. 11
  4. 12
  5. 13

Author

Written by Hozefa Jodiawalla <[email protected]>

Reporting bugs

<https://github.com/tj/git-extras/issues>

From git-extras 7.3.0-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.