With Git, branching has never been easier — especially with the introduction of amazing new workflow capabilities such as git-flow. Some development workflows require that specific developers oversee merges into the master or release branches, while other developers work on bug-fix and feature branches.
Bitbucket’s latest feature, branch restrictions, lets you turn this “gentlemen’s agreement” into a seamless, enforceable process, reducing confusion and time wasted backing out changes that were merged prematurely.
Enforce your workflows
At the heart of branch restrictions is a new repository write permission that allows you to control who can commit to specific branches in a repository. Branch permissions are set on a per-repository basis by specifying a user or group who already has access to a given repository.
Restrictions are based on explicit branch names, or you can use advanced branch permissions to match multiple branches (or tags) using pattern matching. For example, use an * (asterisk) in a rule: “f*r” matches foobar and footer. Establishing naming conventions based on roles or functional area (e.g., “contractor_” or “userauth_”) makes it even easier to set and standardize permissions throughout your organization.
Edit-undo becomes a thing of the past
- If your team is like ours, you want to prevent certain branches from ever being deleted. This is why we’ve added the ability to protect branches from being deleted.
- Rebasing can cause extra merge work for your collaborators during active development. You may want to prevent these problems before they start by preventing rebasing on specific branches.
Simplify your Git repository management
Bitbucket is free individuals and teams of five or less, and includes unlimited repositories. Start a free trial today and get up and running in a matter of minutes!