Renaming a branch in Azure DevOps
In Azure DevOps we can have different branches, but sometimes we might need to rename a branch as the name might not be reflecting the current code we are working or due to some other specific reasons. Though Azure DevOps doesn’t directly provide us a way to rename, there are some workarounds for renaming a Branch in Azure DevOps
Renaming a branch in Azure DevOps
-
Go to Azure DevOps Project and Click on Repos
-
Choose the Repo in which the branch name needs to be changed
-
Click on branches
-
Let us say I want to rename the Test1 branch to “NewTest1” branch. Click on 3 dots next to “Test1” branch & then click on New branch
-
Now enter the new name of branch as “NewTest1” and then click on “Create”
-
Now the new branch “NewTest1” would be created as shown below
-
Once the new branch is created, you can delete the old branch. Thus by these steps you can rename the branch from one name to another