Grant VSTS user access to create new branches

Viewed 5613

How do I grant a VSTS (TFVC) user access to create new branches from a branch? I already granted him "Manage branch" and "Merge" permissions on the ParentBranch.

When he tries to create a new branch named "ChildBranch" from "ParentBranch", he gets the following error: "TF14098: Access Denied: User needs ManageBranch permission(s) for $/ParentBranchName/ChildBranch". Basically it's complaining that the user doesn't have "Manage branch" permission on the branch that doesn't exist yet.

2 Answers

I can repoduce the issue. Grant permission on Root repository resolved it.

Below structure for example:

  • $/TFVC
    • -Main
    • -Test

If you want to branch from Main, then you need to grant the corresponding permission on both Main and $/TFVC

enter image description here


UPDATE:

Important

You cannot nest branches; therefore, you cannot convert any folder to a branch if it either contains a branch or is contained by a branch.

Source here : https://docs.microsoft.com/en-us/vsts/tfvc/branch-folders-files#convert-a-folder-to-a-branch

So, you can only create a branch as I mentioned above.

However if you really want to create a branch under the Main, then you can convert the Main branch to a folder first, then move the branch to Main.

Follow below steps:

  1. Branch from Main as I mentioned in previous steps (For example, CTest branch here).
  2. Covert Main branch to a folder (Right click on Main branch --> Branching and Merging --> Covert to Folder)
  3. Move the created branch (CTest branch here) to Main (Right click on CTest branch --> Move --> To Main folder )
  4. Check in the changes

enter image description here

Related