Bridge For Git (BFG) and "main branch' Branch Protection in GitHub
search cancel

Bridge For Git (BFG) and "main branch' Branch Protection in GitHub

book

Article ID: 415110

calendar_today

Updated On:

Products

Endevor

Issue/Introduction

We are experimenting with Endevor Bridge For Git (BFG) to establish a hybrid model environment where users can work with Endevor OR GitHub Enterprise and would like to inquire about recommended best practice in a few areas.

Should we enable Branch Protection in GitHub for our 'main' branch?  We're worried that if we enable branch protection BFG would not be able to force push or delete elements when updating from Endevor?  What is best practice here?

Environment

Endevor Bridge For Git.

Resolution

Recommended practice is to create mappings under a technical/service account so the push happens under this account (or multiple for different organizations, teams etc.). Then set branch protection rules for developers, but exclude BFG technical user(s). How to do this depends on the Git server used and its version. Some servers allow for granular configuration of permissions, with others the only option is to exclude administrators. Try working with your Git server administrators to figure out best way of doing that.