Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Who can delete a branch in VSTS?

Tags:

azure-devops

I am the owner of the Visual Studio Team Services account. I created a repo, it has 2 branches. I have given access to everyone i.e. every member can access the repo.

enter image description here

Though my team member didn't create the branch, he wanted to delete it, but he couldn't and I could(I also didn't create the branch). When I checked we have the same level of access i.e. both project administrators.

What could be the reason behind this issue?

like image 396
tRuEsAtM Avatar asked Dec 09 '17 00:12

tRuEsAtM


People also ask

How do I delete a VST branch?

Right-click the branch name and select Delete. Visual Studio will ask if you're sure you want to delete the branch if you have unpublished changes.

How do I delete a branch in Visual Studio?

Visual Studio 2017 provides you easy access to both. To delete a local branch, right click on it and select Delete from the context menu. To delete a remote branch listed under the remotes/origin, right click on the desired branch and select Delete Branch From Remote from the context menu that pops up on the screen.


2 Answers

If you are both Project Administrators, you should check if the user has been set permission separately.

In Version control Tab https://account.visualstudio.com/project/_admin/_versioncontrol?, check if the user has been set permission separately:

  • Check in the repo level: select the repo (such as Git2 in below example) -> check if the user has been set permission separately -> if yes -> check if Force Push as Deny -> if yes -> Clear explicit permissions.

    enter image description here

  • Check in your two branches separately: select each branch -> check if the user has been set permission separately -> if yes -> check if Force Push as Deny -> if yes -> Clear explicit permissions.

    enter image description here

like image 190
Marina Liu Avatar answered Oct 02 '22 14:10

Marina Liu


Check Force push (rewrite history, delete branches and tags) permission for repo under Settings > Version Control is set to Allow. Force push to a branch, which can rewrite history and this permission is also required to delete a branch.

like image 25
Sheethal J S Avatar answered Oct 02 '22 15:10

Sheethal J S