GIT-RENAME-BRANCH(1)

πŸ‘‘ git-rename-branch β€” the glow-up your branch name deserves

okay bestie, welcome to git-rename-branch (that's the manual page for the git-rename-branch command, part of the git-extras collection, fr fr). it renames a local branch AND pushes the new one to the remote, so like… it's giving full makeover, not just a haircut. πŸ’…


✨ SYNOPSIS ✨

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

that's it. that's the whole vibe. two args and we're gone πŸ¦‹


🌸 DESCRIPTION 🌸

Rename local branch and push the new branch to remote. that's the whole plot of this movie, no plot twists, no secret side quests. the new name goes up to the remote too, so nothing gets left behind looking dusty. ✨


πŸŽ€ OPTIONS πŸŽ€

  • <old-branch> β€” the old branch, the one that has to be renamed. this one is optional, bestie! if you don't supply a value, then the current branch gets renamed instead. so you can just point at the one you're standing in and say "yeah, that one." πŸ™ˆ
  • <new-branch> β€” the new branch name. the glow-up name. the main character name. pick it with love. πŸ’–

πŸ’« EXAMPLES πŸ’«

renaming a specific branch, old name β†’ new name:

$ git rename-branch old-name new-name

renaming whatever branch you're currently on, because you're lazy and that's valid:

$ git rename-branch new-name

🫢 AUTHOR 🫢

Written by Hozefa Jodiawalla <hozefarules@gmail.com> β€” shoutout to the legend, we love a builder. πŸ‘‘


πŸ’€ REPORTING BUGS πŸ’€

Found a bug? not the vibe, but tell the devs here:

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


🌈 SEE ALSO 🌈

<https://github.com/tj/git-extras> β€” the whole git-extras universe, go explore, it ate. πŸ”₯


okay that's the page!! πŸ’– this is from Git Extras, dated May 2026, and it's the manual for GIT-RENAME-BRANCH(1) β€” now go rename that branch and slay, periodt. πŸŒΈπŸ¦‹βœ¨

πŸ“¦ where this page comes from