Reputation: 47
We are using Team foundation server foundation Git, to centralise our projects. Recently by mistake, I checked into a "parent" branch which we created instead of a "Child" branch which is created from "parent" branch.
Generally, we create a "Child" branch for each task and create a pull request to "Parent" branch, for the review, merge and test.
Can you please tell me if there is a possibility to create warning message that we can set to "Parent" branch, which can warn us before accidentally committing changes to "Parent" branch?
Upvotes: 0
Views: 38
Reputation: 3314
You can use TFS branch policies for that.
Branch policies help teams protect their important branches of development. Policies enforce your team's code quality and change management standards.
And, specifically for your case,
After you set up a branch policy, you cannot directly push changes to the branch. Changes to the branch are only made through pull requests.
This is official documentation (with pictures!) on how to configure branch policies.
Upvotes: 1