Git rename a branch(locally and remotely) Posted on 2024-04-11 In uncategorized Rename a branch in Git locally and remotely. Rename a branch(locally and remotely)1234567891011# Rename a branch locallygit branch -m old-branch new-branch# Delete the remote branchgit push origin --delete old-branch# Unset the upstream branchgit branch --unset-upstream# Push the new branch to remotegit push origin new-branch