问题
In the company I work for we have a Release branch from which we publish versions to production.
I want to prevent a situation where someone checks in changes made in that branch directly without the changes were synced from the development branch.
Is there a way where I could set the Release branch to allow check-ins for change-sets which are of "Merge" type only?
By this I could ensure the change-set was originated from the development branch and achieve my goal in addition to preventing non synced code between production and development branches.
回答1:
You cannot fully restrict a branch to allow merges only. But there is a checkin-policy made by a Microsoft MVP which you can configure. Combined with the checkin-policy from the TFS Power Tools you can configure it to a speficic folder. The configuration process is explained on teh download page.
来源:https://stackoverflow.com/questions/20899859/tfs-set-a-branch-to-allow-check-ins-of-merge-changeset-only