We need a way to grant contributors permission to delete feature branches without allowing everything granted with the "Force Push (Rewrite History and Delete Branches)" permission.
Is this already possible? Is this on the feature roadmap?
Thanks in advance.
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
A reaction from the team would be nice about this... Be able to delete branches of team members is a functionality that would be nice.
We found out that this permission also applies to "Delete [branch name] after merging" option when completing pull request. This was quite unexpected for us as it didn't event warned the user that branch won't be deleted. This can be fixed by allowing permission for force push but we would like it to be sepatare permission for this use case.
Our teams are experiencing the same issue described above. This limitation does not exist in BitBucket. Which leads me to conclude that it is not a git limitation.
One thing that might work for you is you can follow the documentation here to restrict branch creation to folders such as feature, users, etc... https://docs.microsoft.com/en-us/azure/devops/repos/git/require-branch-folders?view=azure-devops&tabs=browser
Once you have done that then you can add an allow rule for a user or group to be able to ForcePush (delete branch) on anything in just a specific branch such as anything under users:
tf git permission /allow:ForcePush /user:[email protected] /collection:https://dev.azure.com/company/ /teamproject:YourProject /repository:YourRepo /branch:users
This will make it so that users have to use the feature or users folder paths and you can then specify for those paths whom is allowed to delete branches... e.g. your reviewers can delete automatically upon pull request approval/merge.
I'm more concerned about the fact that granting Force Push is required for any dev using a traditional Github/Git flow branching policy but at the same time they can also delete tags. Given that tags are how versioning is implemented in these types of flows a developer could delete all our tags (and hence version information) by accident.
Thanks for your question. It looks like your question isn't an issue with the documentation, but an issue or question specific to your implementation or a bug in the product itself.
For help with a specific task, here are a couple of options where you might consider asking your question:
If you've encountered an issue with the product itself, to make sure it gets in front of the right people, please submit your bug here.
If you have an idea for improving the product, please submit your idea here.
Most helpful comment
A reaction from the team would be nice about this... Be able to delete branches of team members is a functionality that would be nice.