Page 1 of 1

Git: Lock all edits on a branch

PostPosted: Thu Nov 19, 2020 10:26 am
by MatrixDee
We are using Git with Azure Devops, Flare 2019r2. In Azure Devops, I have a policy preventing commits to master. You have to go through a pull request to merge from a feature branch to master. However, we frequently run into trouble when we checkout master in order to run the build, then forget we're on master, and make changes. When this happens, I stash the changes (via gitbash), switch branches, and then pop the changes back to the feature branch where they belong.

Is there a way to lock a branch in Flare so that you can run the build, but cannot edit the files? Does anyone other ideas or advice for keeping a "clean" master branch in a multi-authoring environment?

Thank you!