Block creation of branches that have matching names

Now, admins can block creation of branches that match a configured name pattern. For example, if a repository's default branch is renamed from master to main, admins can prevent any subsequent creation or push of the master branch so that only the new branch name is used.

Previously, admins could use branch protection rules to restrict who could push to existing branches, but they couldn't block the creation of those branches. This is now possible using a branch protection setting named Restrict pushes that create matching branches. To use the setting, create a new branch protection rule with a name pattern that matches the branch name you want to block (e.g. master or not-allowed*). Then, enable the settings Restrict who can push to matching branches and Restrict pushes that create matching branches, as shown here:

An image showing the two branch protection settings to enable for restricting pushes that create matching branches

For more information, visit About protected branches in the GitHub documentation.

We appreciate feedback on this and other topics in GitHub's public feedback discussions.

Today's Changelog introduces several updates to the projects (beta), including the highly requested side-panel, and other improvements!

💥 Direct editing and comments with side-panel

You spoke, and we listened!

This first iteration of the new side-panel in the new projects includes all of the functionality you're used to: editing issue descriptions as well as modifying labels, assignees and milestones.

Directly from the side-panel, you can now…

  • 💬 read and leave comments
  • ⚙️ edit project custom fields
  • 🤠 react to issues and comments with emojis

Check out the projects side-panel by enabling in your feature preview. Once you try it out, we would love to hear your feedback in the corresponding feedback discussion!

Side-Panel GIF

🔍 Improvements to adding items under filtered views

We've improved the experience working within filtered views! Now when you add a new item to your filtered view, instead of disappearing, projects automatically matches the metadata of the new item to the metadata of the row above it.

New_Filtered_Add

🤩❤️👀 More Emojis! ✨💥🥳

Coming soon! We've added the ability to access the GitHub emoji picker from anywhere in projects. Once launched, type : into any project text field to check it out.

See more

The GitHub Command Palette (cmd/ctrl+k) now supports commands with multiple options. Type > in the Command Palette and access two new commands:

  • Change tab size rendering – Change your tab size rendering preference on the fly
  • Switch theme – Switch between GitHub themes in an instant

Change the tab size rendering preference using the Command Palette on GitHub

See more