Is there a way to change branch name in Azure DevOps. As shown in SS i have named my branch as Developer branch, now i want to change it to a specific request-id. Is this possible.
Unfortunately, you are not able to rename a branch. However, you can create a new branch from the branch which you want to rename then you can delete that branch.
As per the design, the rename of azure repo branches is not implemented. You can see this existing similar thread
Microsoft's documentation page "Rename old branches" gives the following instructions:
- open repo > Branches view.
- locate the old branch.
- hover over the old branch > ...(More) icon > + New Branch.
- enter the new branch name > Create branch.
- hover over the old branch > trash icon (Delete branch).
Best way to do is, create a new branch from the original branch, give the new name to it and then delete the original branch.
For example: Rename Branch A to B
- Create New branch From A (Based on A)
- Enter the New branch Name as B
- Delete the branch A.
Note: If you are following this steps, you will have the full history of the branch and also you can rename the branch. You will not have the history of the branch if you are deleting the branch and then creating the new branch.
There is no direct way to rename the branch in azure DevOps but the alternative is to delete the branch and rename it.
You can do this by following these steps:
- Rename the branch using git from X to Y
- In Azure:
- Delete the linked branch (X)
- Add a link to your new branch (Y)
You can cut a new branch with the desired name from existing one. then create a PR from existing one to newly created, by opting delete after merge functionality.
© 2022 - 2025 — McMap. All rights reserved.