Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
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 'https://xxx.visualstudio.com/DefaultCollection/_git/Xxxxxx'

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!

28.4k questions

29.7k answers

500 comments

94.1k users

Browse Categories

...