git rename branch

git branch -m <oldname> <newname> # Any Branch
git branch -m <newname> # Current Branch

# For windows if you get "Branch already exists" error
git branch -M <newname>

4
7
RainCast 90 points

                                    git push origin &ndash;u new-name

4 (7 Votes)
0
4.2
10
OoT79 115 points

                                    git push origin &ndash;u new-name

4.2 (10 Votes)
0
3.43
7
PG Kathy 130 points

                                    git branch &ndash;m old-name new-name

git push origin :old-name new-name
git push origin &ndash;u new-name

3.43 (7 Votes)
0
0
0

                                    git branch -m &lt;new_name&gt;

0
0
0
0
Robasta 85 points

                                    git branch &ndash;m old-name new-name

git push origin :old-name new-name
git push origin &ndash;u new-name

0
0
4.2
5

                                    # Rename the local branch to the new name
git branch -m &lt;old_name&gt; &lt;new_name&gt;

# Delete the old branch on remote - where &lt;remote&gt; is, for example, origin
git push &lt;remote&gt; --delete &lt;old_name&gt;

# Or shorter way to delete remote branch [:]
git push &lt;remote&gt; :&lt;old_name&gt;

# Push the new branch to remote
git push &lt;remote&gt; &lt;new_name&gt;

# Reset the upstream branch for the new_name local branch
git push &lt;remote&gt; -u &lt;new_name&gt;

4.2 (5 Votes)
0
4
4
Imkost 95 points

                                    git push origin :old-name new-name

4 (4 Votes)
0
4.33
6

                                    git branch -m &lt;new_name&gt;

4.33 (6 Votes)
0
4.38
8
BWA 85 points

                                    git push origin :old-name new-name

4.38 (8 Votes)
0
4
8

                                    # Rename the local branch to the new name
git branch -m &lt;old_name&gt; &lt;new_name&gt;

# Delete the old branch on remote - where &lt;remote&gt; is, for example, origin
git push &lt;remote&gt; --delete &lt;old_name&gt;

# Or shorter way to delete remote branch [:]
git push &lt;remote&gt; :&lt;old_name&gt;

# Push the new branch to remote
git push &lt;remote&gt; &lt;new_name&gt;

# Reset the upstream branch for the new_name local branch
git push &lt;remote&gt; -u &lt;new_name&gt;

4 (8 Votes)
0
Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
how to rename branch remote rename a branc on git how to create branch and rename in rename present branch git command for renaming branch how to rename current branch git rename brach rename branch name local change name of remote branch git rename repository branch to rename a branch in git github how to rename branch change branch remote name git rename branch with git branch rename in git git how to change your branch name git command for rename branch git can i rename remote branch how can i rename brances rename git branch on github.com git command to rename the branch how to rename current branch in git rename a branche git how to rename a branch in gitl how to rename your branch name rename git branch locally and remotely how to rename your current branch locally rename git brach rename created git branch commAND git rename branc rename git branch in local how to rename branches rename git branch and push it rename github branch through git rename une branche git git remote branch rename command rename branch locally and remotely renaming the git branch name git change branch name on remote can i rename branch in git git rename current branch locally rename current local branch git how to rename a current branch how rename a branch in git rename a branch locally and remotely rename branch git online rename branch git name rename git branch to main git rename another branch to branch rename command how to rename remote branch in github rename branch locally and push rename branch name in git origin rename the remote and local branch rename git branhc rename remote branch git gui hoe to rename git branch how to rename a branch in git bash change the name of remote and local branch in git rename my current branch rename a github branch change branch name on remote] how to rename local branch name branch rename git command how rename branch how to rename branch in git local and remote rename a local git branch git rename branch from remote renaming a branch git change git branch name remote rename branch but keep remote git how to rename a branch name in git how to rename local branch on git change git branch rename rename a branch git local how to rename branches are there in git How do I rename my branch rename branch git git branch -b how to rename a branch in git local and remote how do i rename a branch in github syntax to rename git branch name rename git branch command git command to rename a remote branch git rename branch delete remote rename a git branch in local rename master branch git rename branch command line rename branche git git rename branch and push to remote local branch rename git change remote branch name in github how to rename my branch in git how do i rename a branch in git How to rename your local branch? git can i rename the master branch git can i rename a branch git and githib rename branch how to rename branch with git rename remote brach goit branch rename rmeote goit branch rename git branch change remote name change name to a remote branch git renamebranch git update remote branch name git branch local rename rename locale branch rename the branch rename git brnach how oto rename a git branch rename branch remote and local rename a branch git from anoher branch git bash undo branch rename git bash rename branch RENAME A GIT BRANCH NAME remote branch name change can we change a branch name in git how to rename git local branch how to rename branch git remote how to rename main branches in git rename branch ? git command rename remote branch rename a branch in remote git git rename the master branch branch name rename in git rename a remote branch git how rename branch in git tgit rename branch rename git branch# github rename branch remote github how to rename a branch rename branch name in git remote rename branch github locally rename branch on git rename branch remote branch in github rename branch remote branch rename a branch in git lcoally git rename local brnach rename a branch git remote git rename or delete branch rename branch git command rename branch in local and origin git rename current local branch rename a branch in git local and remote how to rename a git branch locally and remotely rename local branch in github git remote branch change name update remote branch name git change branch name in remote rename branch onb git server rename a git branch remote git branche rename rename branch and remote git rename branch github rename remote master branch github how to rename github remote branch rename git branch in terminal how to rename brach in git git branch name rename rename git remote branch renmae git branch rename remote git branch name rename branch that is remote how to rename branch in git on local and repo git change branch name remote rename remote branch that local branch is tracking how do I rename a local branch git local branch rename how to rename branch in terminal how to rename a current branch in git rename a git branch local git rename local branch only how to git rename remote in local rename branch git GUO git renaming remote branch how to rename the git branch name how to rename a branch locally git how to change branch name on remote rename locla branch git how to rename a branch locally change branch rename git rename branches in git git branch renamwe rename the remote branch in git git renaming a remote branch smartgit rename remote branch rename local branch github rename local branch igt how to rename a local and remote git branch rename a branch local rename master branch fgit rename branch git branch rename branch change branch name on remote and local Git rename remote branch only renaming local branch git rename branch git and push rename uncommited branch git git how to rename the branch rename brancj rename local bran how to change the git brancgh name how to rename existing branch name in git how to rename a branch in git and push to remote git master branch rename rename branch ygit rename branch name as remote rename git branch local rename the name of branch git how to rename branch name to master renaming remote branch git edit branch name git rename git branh rename the remote branch name in git rename local branh hg rename branch change a remote branch name git bash rename current branch git rename braanch can you rename a branch in github] how to renamee branch git git rename branch server rename branch in git remote rename a remote branch rename branch git locally command rename current branch rename branch git on local and remote how to rename a git branch in local how to \rename a branch git rename branch\ github change branch name on remote how to rename git branch locally rename brach git how do I rename remote git branch rename branches git change branch name on remote github rename branch local and remote how to rename a branch in terminal rename branch in local and remote change the name of remote branch rename remote branch name rename branchgit rename in git branch how to edit remote branch name in git rename work branch cant rename git branch git rename branch to master how to change the remote branch name in git git rename branch on remote and local rename branch remote git rename branch local and remote git rename your branch on git create branch rename git rename branch name local change the name of remote branch in git git rename repo branch git rename local branc rename branch and push to new remote how to rename brance in remote and local renname git branch rename branch git] rename a branch in git local git command to rename a branh git comand rename branch change the remote branch name rename curren branch if i rename branch on local will it change branch on remote rename a branch gitt how to change remote branch name rename local branch name git git rename branch local and origin git branch rename remote branch rename origin branch main git. rename branch git undo branch rename how to ren rename branch name rename remote branch name in git rename brancch git rename default branch git rename branch git bash rename branch on server git change name of a remote branch rename a branc rename current branch git branch rename remote and local revert rename branch local it rename branch change branch name git remote git rename branches How to rename the branch in remote how rename remote branch git how rename branch git rename a branceh how to rename branch on local rename git branch command line git command to rename current branch does rename branch local remote git rename branch along with remote rename a git branch locally and remotely how to rename a local git branch can i rename remote branch how to rename remote branch git rename branch locally and remotely git how to change remote branch name in git rename git branch name locally gitt rename branch git cmd rename branch git rename branche renaming github remote branch change name branch remote how to change rename branch in git rename branch git githubb rename branh git git how to rename local and remote branch git rename branch main git command to rename local branche rename curren branch git git command to modify branch name rename local branch in git git branch rename example reame git branch rename a branch after its creatd change remote branch name rename a branch in git remote rename branch name cmd how to rename branch terminal github rename origin branch git rename bracnh git rename branch remote shuold i rename local git brach rename remote git branch how do you rename a branch in git how to rename remote branch ig g git rename branch localn rename current branch name can you rename branch git rename branchs git rename to create a new branch git rename brance how I can rename a branch in git how to rename a git branch name how to rename git branch name git rename branch in github rename git remote default branch git rename a branch remote rename a branch on github git rename a branch locally and remotely git-svn rename remote branch git rename brancj rename branh rename a brancn hwo to rename branch rename a branch you just made git command to rename local branch renaming git branch renamme branch git renaming a branch , git rename branch naeme how to rename git branch? how to rename a branch in githut how to rename branch in git local git can you rename branch easily change branch name remote git how to rename my current branch rename branch git cli rename branch in local git how to rename local git branch name how to rename git remote branch name rename git branch github rename git branch on local rename the branch name how to rename branch in local how to rename a branch name git how to rename the master branch in git how to rename a git branch ? git remote branch rename rename the branch git comman rename github branch push rename branch to remote git how to rename current branch locally rename the git branch git branch rename local and remote git rename brnach how ot rename a branch from terminal how to chance branch name rename a local and remote branch in git is it possible to rename branch in git how to update a branch name in bitbucket rename current branch? git checkout rename branch git change name remote branch how to rename remote branch in git change the name of a branch git rename my branch name in git Github how rename a branch how to rename branch in git hub rename branc git fork rename local and remote branch gitz rename branch git rename branch and push git how to rename master branch rename git branch remote rename git branch published git change current local branch name how to rename a branch on github change branch neame change branch name bitbucket rename remote rename local branch name how to rename origin branch git rename bracnh git can you rename a remote branch how to rename local branch git rename origin branch how to rename a branch using git command how to rename a brach git rename a branch name git local branch renae how to rename a git branch locally how to rename branch name in github how to rename branch in gerrit change the current branch name in local git update branch name git command to rename the branch name gitlab change branch name in PR git branch rename remote how to rename git branch local update branch name command line can you change a branch name in git how can rename git branch using cmd how to rename branch on github how to change branch name in terminal change a branch name in git change name of local branch git git change branchname change name of a branch git how to change branch name in command line git name branch renaming a github branch can you change the name of a branch in git git rename branch bitbucket how to change branch name in git local change branch name in github change git branch name local renam branch how do i change a branch name on git can i rename my branch how to remname baranch name in git rename a branch locally rename a branch in github change bran name git git remote branch renamed chnage branch name gitlab rename branch rename the git bracnh change remote branch name git rename branch git origin git can you rename a branch rename a git branch remote and local change name of current branch how to rename remote branch change the branch name after creation git command rename current branch how to change the branch name in git rename a local branch git rename branch git terminal rename origin branch git renaming a branch rename a remote branh git rename but can't create branch add remote rename branch git command modify branch name git git change branch name local and remote renmae branch git rename git remove old branch rename git branch and remove old branch rename git branch and remove branch how to rename git branch remote renaming git brach git how to rename branch name how to change the name of a branch in git how to change a branch in git locally how to change the name of branch in git git branch change name how to rename branch name change remote branch name bitbucket rename for git branch how to rename github branch name github rename branach git command rename branch git branch frename current branch how to rename partner in git how to rename git branch command line rename branch on github change the local branch name in git how to change current branch name in git to main git change name of local branch rename a specific branch in git how to change the name of my branch rename branch remote rename a branck git rename the brnach changing the name of branch git change name of local and remote branch git branch name update rename branch gitbucket git rename remote origin branch rename branch git local remote rename a branch to match remote git rename branch command rename local git branch name rename the current branch in git change name of current branch git changing branch name in got how to rename branch name in git git rename command to rename branch in git rename remote branch github change branch name terminal change git branch how to switch git branch name how to rename branch vsc git remote rename rename branch name git local git name new branches git change current branch git changing branch name git remain branch git change the branch name renaming a branch in github git push rename local branch to remote change branch name git local rename branch cli git change name on local branch rename branch to existing branch how to change branch name in github rename local branch on git change branch names git not working change branch names git rename branch git remote re namae branch change name branch git how to branch name edit how to rename branches in git rename a branch in bitbucket how to change branch name locally and remotely git change name of current branch rename git branch local and remote how to push branch name change how to change local branch how to change local branch names remote branch rejected rename how to change the name of a branch on git git change name local name and remote name remane a branch in git git rename a remote branch git command to change branch name change the name of a local branch git how do you change the name of a branch how to rename the current branch in git how to change the name of the branch on git how to edit the branch name in git change name of remote branch changethe name of a branch git git change branch name locally how to change github branch name git how to rename branch rename remote branch git git rename branch local and remote change the name of a remote branch git rename branches how to rename remote branch in githyb branch renaming git Change the branch name on server git how to change the name of a branch in remote branch git how to change the name of a branch how to change the branch name how to rename branch from the terminal rename a local branch name git from different branch rename a local branch name git from different brancg how to rename a remote branch in git how to update remote branch name how to change git branch name in git how to change git branch name how to rename the branch command for renaming the branch in git git rename branch remote and locally git change brancgh name git renaming brnach git branch rename mac change branch name git command change the git branch name renaming a git branch git go abck to renamed branch rename the local branch git rename the local git branch rename origin branch git git branch renaming for remote branch branch rename how to change the name of the branch in git git rename branch locally git rename branch locally and remotely rename a git branch git bash renamining current branch git Rename a branch name rename global branch rename a branch githib git push and rename branch rename a local branch git branch rename origin change branch of gitlab remote change branch name on git how to rename brnahc change a branch name how to rename branch git how to change branch name in local edit branch name rename remote branch in git rename. branch in git renam branch git git change origin branch name rename local branch git change branch name online rename branche change branch name in local rename branch on remote git renmae branch local branch develop change name how to rename remote git branch how to change name of remote branch in git how to change name of branch in git how to rename a local and remote branch in git can you change a remote branch name vsc git rename just created branch change branch name locally git how to change branch name git change remote origin branch name git branch origin name change git update branch name how to rename a git push git rename btanch chancge branch name rename git git push renamed branch how to rename a branch on bitbucket git how change branch name how to rename git branch local and remote rename remote branch change a branch name git bash rename branch local how to rename branch name git how to edit branch name in git how to rename branch can you rename your branch ? how to renamin a git branch renaming the local branch in git gitkraken rename branch how to rename branch locally how to change name of git local branch rename gut branch git rename current branch local modify git branch name git rename brancg can you rename a release branch how to rename a branch in github cli how can rename git branch how to update git branch name how to rename gi branch git checkout rename local branch how can we rename a branch in git ? rename upstream git git change name to a branch git rename remote branch visual studio rename git branch via command line change name branch change pr name local and remote git bash rename local branch and remote rename remote and local branch g rename branch git rename a branch local and remote git branchmodify how to rename a git branch once a pr is created git command to rename can i rename a branch in git how change name branch chnage a branch name in git how to create git branch as name/local rename origin branch github change a branch's name rename branch problem how to change the name of a branch in github chage name of branch online github change branch name local and remote can you rename a branch in github rename branch locally in git how to disable rename branch rename git lab branch git rename branch origin renamle branch git how to change a branch name can you rename git branch git naming branches with changes how to update branch name in bitbucket how to name git branch name git renme branch rename git command change name git branch git force rename branch goit rename remote branch git rename branch atlassian change name in local branch git cancel brach rename how to update the branch name in git rename the branch in git git branch name to use when updating how to remname branch git change name of brach local and remote how to rename the branch name What's up with the branch name change in git rname current branch name git extensions change git branch rename local and remote git rename branch in local how to rename remote branch name in git change name on local branch rename loca branch rename branch name how to change the feature branch name in git bitbucket rename branch git push origin new name change a branch name bitbucket github rename a branch git remote rename branch how to rename a brancg change name of branch in git when did git change repo branch name rename branch on origin rename branch on or renaming branch renaming branchgit git how to change brnach name how to change the name of a branch rename branchs git change remote branch name how to give branch name in git github rename branch in team teamviewer rename branch on remote github how to change branch name in git remote rename branch in git repo how to change name of the branch git how to change the remote branch for local branch git how to change remote branch name what is the name of my local branch? how to change branch name in git local and remote rename branch in local and remote gitlab rename branch in local and remote gitla rename branch in local and remote git renameing git branchg how to change the git branch name change branch name in git local and remote how to rename a branch name git remname branch git rename existing branch how to change branch name in git linux change name of the branch git how to renmane branch git rename a remote branch in git how to rename branch locally and remotely local branch rename git rename remote and local branch git checkout rename how to change branch name git change remote branch name how to rename origin branch renamegit branch change branch name git command line rename git branch manually how to rename brtanch change name remote branch change github branch name git command to rename a branch git rename remote branch without deleting how to push a renamed branch in github change the name of a branch rename both local and remote branch atlassian rename bot local and up branch how to rename the branch name in git RENAME CURRENT BRANCH AND CREATE NEW GIT can you change branch name git checkout remote branch and rename the branch rename local and remote branch git rename branch name remote git change branch anme git renamer branch to rename local and remote branches in git git how to rename a local branch can we change the branch name in git commands to rename remote branches in git change branch na,e git git rename origin branch name git command to rename branch git rename branch name local and remote git rename a local branch git branch rencame how to change my git branch name change the name of the branch in git how to rename branch in git bash git update remote branch name rename branch git local and remote can we rename branch name in git change name of a branch in git rename git brancch branch rename git rename a local branch in git renaming git branch locally rename the branch git git rename brunch change name of branch git remote git how t ochange branch name how to rename branch github command line github change branch name can you rename branches in git rename local branch name in git a branch has been renamed github how to change local git branch name rename branch github while on the branch renaming branch in git can i rename a git branch edit git branch name cli rename branch git in terminal change the name of a branch in git git rebname branch git push new branch renamed git how to change the name of your branch git command to rename a local branch github how to rename branches github how to renamebranches git rename branch name git rename remote branch name git rename branch remote rename branches git cli rename a branch git lab change the name of a branch github how to change branch name git git edit branch name rename branch name git git change my branch name git branch name change how to change git branch name in local how to rename branch github git branch rename command git rename local branch name how to change a git branch name renaming a branch in git change the name of the branch git rename local and remote branch git change a branch name git change name branche git git reaname branch renaming the git branch change local branch name in git rename current branch git git rename the branch in remote also remane a branch git git rename the branch vscode git rename branch git renaming branch github rename remote branch rename a remote git branch change branch name github rename git branch after push how to rename local git branch git rename local and server branch how to rename branches in github rename a local branch name git git rename remote branch gir rename branch how to rename local branch in git how to rename an existing branch in git rename branch name in git command git change name of branch git set branch name git rename branch local how to change current branch name in git how can i rename a branch in git modify name of branch git how to rename branch in github git change name of branch local git how to rename local branch how to renamea git branch can you change the name of a local git branch rename branch git remote and local how to rename git branch in git lab change name of working branch git rename custom branch git rename branch local and remote how to rename a branch git github rename branch] change name of branch how to rename the origin branch in github rename a branch in git change the branch name in git rename branch in git change name local branch git git how to rename a branch git chage the name of exsisting git branch how to rename my branch in github change branch name rename git branch name change brnahc name git rename branch git renaming a branch git change name branch rename pushed branch how to rename a branch in github how to rename git branch how to rename github branch git rename branch git how to rename branch name in bitbucket rename remote bra how to change branch name in git rename branch locally renamed branch rename a branch git fix branch name how to rename a branch change branch name git how to change git branch name via terminal rename branch rename branch github github rename branch delete branch git rename a branch github how to rename local branch git rename the branch name in git change the name of current branch git change name of current local branch git git renam branch git rename an existing branch how to rename a local branch in git change git branch name chage branch name git how to change a branch name in git how rename git branch git rename current branch rename local git remote change local branch name git git change branch name how to modify git branch name git rename branch remote and local rename local branch git rename git branch locally rename a branch git bash change branch name in git rename git local branch git change branch name local rename a branch git how to rename the branch in git renme git branch rename branch git local rename a branch in github on command line rename local git branch git branch rename local renaming branch git how to rename the git branch rename branch name in git rrname git branch change name of branch git can we rename a branch in git how to rename branch in git can you rename a branch in git rename a git branch git rename a branch rename git branch git branch rename git rename local and remote branch git remane branch git rename branch how to rename a git branch git rename local branch how to rename a branch in git rename branch git
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source