Explore Courses Blog Tutorials Interview Questions
0 votes
in Azure by (45.3k points)

we are using git in Team Foundation Service, and we are trying to find a way to delete a remote branch by running the following command.

git push origin --delete TheBranchName

The remote server keeps rejecting with the following error:

 ! [remote rejected] TheBranchName (TF401026: The ForcePush permission is required to perform this action.) error: failed to push some refs to ''

1 Answer

0 votes
by (16.8k points)

You can access security options at the repository using this way:

  • Code->Explorer, then you have to Select a repository from the Explorer 
  • Now, in the repository details, click on the name of the repository 
  • Then Select "Manage repositories... menu"
  • Now, you should be able to configure the rights of every contributor groups & individual users and the branches. "Rewrite" and Destroy History (allow for force push)
Welcome to Intellipaat Community. Get your technical queries answered by top developers!

30.5k questions

32.6k answers


108k users

Browse Categories