branches - GitHub Changelog https://github.blog/changelog/label/branches/ Updates, ideas, and inspiration from GitHub to help developers build and design software. Thu, 18 Apr 2024 16:32:37 +0000 en-US hourly 1 https://wordpress.org/?v=6.7.1 https://github.blog/wp-content/uploads/2019/01/cropped-github-favicon-512.png?fit=32%2C32 branches - GitHub Changelog https://github.blog/changelog/label/branches/ 32 32 153214340 Push rules public beta https://github.blog/changelog/2024-04-18-push-rules-public-beta Thu, 18 Apr 2024 16:32:37 +0000 https://github.blog/changelog/2024-04-18-push-rules-public-beta Push rules public beta

The post Push rules public beta appeared first on The GitHub Blog.

]]>
Say goodbye to unwanted files cluttering your repos, like *.jar or *.so. And limit who can make updates to sensitive files like your Actions workflows with the public beta of push rules. 🎉

A glimpse of push rules in action

You can now enable a new type of ruleset that allows you to control pushes to repositories based on file extensions, file path lengths, file and folder paths and file sizes. Push rules don’t require any branch targeting as they apply to every push to the repository, and also apply to all forks of the repo to ensure all pushes to the repository network are protected.

Push rules are now available for private and internal repositories for GitHub Teams, and across organizations for GitHub Enterprise Cloud.

Learn more about push rules in our documentation and join the community discussion to leave feedback.

The post Push rules public beta appeared first on The GitHub Blog.

]]>
77548
Updates to repository pages https://github.blog/changelog/2023-12-06-updates-to-repository-pages Wed, 06 Dec 2023 17:22:01 +0000 https://github.blog/changelog/2023-12-06-updates-to-repository-pages Updates to repository pages

The post Updates to repository pages appeared first on The GitHub Blog.

]]>
We are rolling out a few minor updates to the user experience for GitHub repositories starting today, in order to be more responsive, performant and more easily accessed by a broader range of users.

Repository Overview:
Screenshot of repository overview page showing entering a letter to expand to go to file menu.

  • Go to file: Quickly get to the file you want from the top of every repository using our existing code search and navigation experience.
  • Special files: If you have Code of Conduct, License, or Security files in your repository, they are now shown in tabs alongside your README.

Branches:
Screenshot of branches page showing the overview tab for branches of GitHub Docs repos.

  • Status checks: At a glance, see the status checks’ details on any branch.
  • Stale Branches: The overview page for branches no longer defaults to showing stale branches to improve load times. You can still easily see stale branches by clicking the “Stale branches” tab.

Commits:
Screenshot of Commits page filtered by date and user.

  • Filters: New commits filters allow you to sort by users or limit results to specific date ranges.

These changes have been in a feature preview for the past few months and thanks to community insights, we’ve made several improvements that allowed us to now exit the preview, and bring these enhancements to everyone on GitHub. Join the conversation about this release in the community discussion.

The post Updates to repository pages appeared first on The GitHub Blog.

]]>
75721
New branches and commits pages – feature preview https://github.blog/changelog/2023-10-23-new-branches-and-commits-pages-feature-preview Mon, 23 Oct 2023 18:46:57 +0000 https://github.blog/changelog/2023-10-23-new-branches-and-commits-pages-feature-preview New branches and commits pages - feature preview

The post New branches and commits pages – feature preview appeared first on The GitHub Blog.

]]>
New updates to the branches and commits pages are now in feature preview. These updates are focused on improved navigation, performance, and making these experiences more accessible.

Branches

Screenshot showing new branches page on GitHub Docs Repository

We added clarity to the list header explaining what each section of the branches page does. Stale branches are now hidden by default to speed up page load times.

GIF walkthrough of branches page showing the new UI and clicking on various elements to show new functionality.

Commits

Screen shot showing new commits page on GitHub Docs Repository

You can now filter commits by a date range and collapse the list per day to find the commits that matter to you quickly.

GIF showing the commits page filtering by date in a calendar and collapsing commits for a whole day

Click here if you have feedback and let us know in our community discussion.

The post New branches and commits pages – feature preview appeared first on The GitHub Blog.

]]>
74872
Enhancements for admins bypassing branch protections on github.com https://github.blog/changelog/2023-04-20-enhancements-for-admins-bypassing-branch-protections-on-github-com Thu, 20 Apr 2023 17:44:29 +0000 https://github.blog/changelog/2023-04-20-enhancements-for-admins-bypassing-branch-protections-on-github-com Enhancements for admins bypassing branch protections on github.com

The post Enhancements for admins bypassing branch protections on github.com appeared first on The GitHub Blog.

]]>
When editing a file on github.com, repo admins, actors with the bypass branch protections permissions, and actors in bypass lists on branch protections will now default to creating a new branch instead for directly committing. You can still commit directly to a protected branch, but doing so will add notifications in-line highlighting that some rules will be bypassed.

Historically the default behavior was to push through any branch protections with no notifications they were being bypassed.

Now we recommend creating a branch for admins eligible to bypass branch protection rules. This behavior occurs when adding new files to a repository as well as during pull requests.

Screenshot of commiting directly to a repository
Screenshot of bypassing rules in a PR>

We appreciate your feedback in GitHub's public feedback discussions

The post Enhancements for admins bypassing branch protections on github.com appeared first on The GitHub Blog.

]]>
71453
Introducing Repository Rules Public Beta https://github.blog/changelog/2023-04-17-introducing-repository-rules-public-beta Mon, 17 Apr 2023 15:38:38 +0000 https://github.blog/changelog/2023-04-17-introducing-repository-rules-public-beta Introducing Repository Rules Public Beta

The post Introducing Repository Rules Public Beta appeared first on The GitHub Blog.

]]>
Today we are announcing the public beta of repository rules! 🎉

Repository rules are GitHub’s next evolution of branch protections to help make your repositories more secure and compliant at scale.

Screenshot of ruleset overview

Rules allow you to easily define protections for branches and tags in your repositories and, if you are a GitHub Enterprise Cloud customer, to enforce them across your organization. It is also easier for everyone collaborating on your repositories to know what rules are in place.

Creating rules

Screenshot of creating a ruleset

At the core of rules is the ability to define rulesets. A ruleset is a collection of rules that are enforced together. For example, you could require that all commits to a branch are signed and that those commits have two reviewers. Rulesets can also be applied to tags, allowing you to enforce rules on releases.

The ruleset page is the central place to view and manage all the rules for a repository. It shows the rules that are currently in place and allows you to add new rulesets or edit existing ones.

When creating a ruleset, you define its enforcement status as active or disabled. Active rulesets must pass for a commit to be merged, while disabled rulesets are not enforced; they will not prevent merges but allow admins to craft rules before enforcing them. Enterprise Cloud customers can also evaluate rulesets: a “dry run” mode for understanding the impact of new rules before they are active and enforced.

It’s also easier to target branches and tags in rulesets, with options to select the default branch, all branches, and branches or tags that match an fnmatch pattern. You can add multiple patterns to a ruleset to apply it to different branch and tag naming styles.

Viewing the rules

You can always know what rules are in place for a repository.

Anyone with read access to a repository can view its rules and what they mean. The rulesets overview is linked from the branches page by clicking the shield icon, and from a pull request, and from the output of the Git CLI when rules block a push.

From here, you can filter rules by branches or tags to understand how a rule might be enforced on your next push.

Screenshot of read only view of rules

Getting Started

Repository rules are now available to all GitHub cloud customers. To get started, visit the documentation to learn how to enable and use rules. For Enterprise Cloud customers, visit the documentation to learn about organization rulesets and more.

We want to hear from you on how we can improve repository rules! Join the conversation in the repository rules public beta discussion.

The post Introducing Repository Rules Public Beta appeared first on The GitHub Blog.

]]>
71381
Info messages for bypassing branch protections in Git https://github.blog/changelog/2023-03-29-info-messages-for-bypassing-branch-protections-in-git Wed, 29 Mar 2023 13:01:25 +0000 https://github.blog/changelog/2023-03-29-info-messages-for-bypassing-branch-protections-in-git Info messages for bypassing branch protections in Git

The post Info messages for bypassing branch protections in Git appeared first on The GitHub Blog.

]]>
We now show bypassed branch protection rules in response to Git pushes. These are information messages and are not designed to block workflows.

Historically there was no indication after a Git push that branch rules had been bypassed.

Repo admins, actors with the bypass branch protections permissions, and actors in bypass lists on branch protections will now see a list of rules that were bypassed.

Screenshot of Git command line interface showing list of rules

We appreciate your feedback in GitHub's public feedback discussions

The post Info messages for bypassing branch protections in Git appeared first on The GitHub Blog.

]]>
71010
Manage branch protection rules with a new permission https://github.blog/changelog/2023-02-08-manage-branch-protection-rules-with-a-new-permission Wed, 08 Feb 2023 18:29:22 +0000 https://github.blog/changelog/2023-02-08-manage-branch-protection-rules-with-a-new-permission Manage branch protection rules with a new permission

The post Manage branch protection rules with a new permission appeared first on The GitHub Blog.

]]>
You can now create a custom role to manage branch protections without having to grant the Admin role. Previously, to manage branch protections you had to be an Admin which provides additional permissions that may not be needed. For tighter control of Admin permissions, you can now craft a custom role that has the Edit repository rules permission, allowing just the right amount of access.

Image of Custom roles that shows the new Edit Repository Rules permission

This permission grants the ability to create, edit, and delete both branch protection rules and protected tags.

For more information, visit Managing custom repository roles for an organization in the GitHub documentation.

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

The post Manage branch protection rules with a new permission appeared first on The GitHub Blog.

]]>
70047
False-alert flags will appear in audit logs due to a bug in branch protections https://github.blog/changelog/2023-01-19-false-alert-flags-will-appear-in-audit-logs-due-to-a-bug-in-branch-protections Thu, 19 Jan 2023 19:25:52 +0000 https://github.blog/changelog/2023-01-19-false-alert-flags-will-appear-in-audit-logs-due-to-a-bug-in-branch-protections False-alert flags will appear in audit logs due to a bug in branch protections

The post False-alert flags will appear in audit logs due to a bug in branch protections appeared first on The GitHub Blog.

]]>
Organizations and enterprises using branch protections may see false-alert flags in their security log for protected_branch.policy_override and protected_branch.rejected_ref_update events between January 6 and January 11, 2023.
These events were improperly emitted due to a change in the underlying logic that checks if branch protection criteria have been met.

No action is required from impacted users with regards to these events. GitHub has a policy to not delete security log events, even ones generated in error. For this reason, we are adding flags to signal that these events are false-alerts.

an audit log entry with the flash message displayed above it

The post False-alert flags will appear in audit logs due to a bug in branch protections appeared first on The GitHub Blog.

]]>
69618
GraphQL APIs for creating a branch linked to an issue https://github.blog/changelog/2022-10-31-graphql-apis-for-creating-a-branch-linked-to-an-issue Mon, 31 Oct 2022 16:11:22 +0000 https://github.blog/changelog/2022-10-31-graphql-apis-for-creating-a-branch-linked-to-an-issue GraphQL APIs for creating a branch linked to an issue

The post GraphQL APIs for creating a branch linked to an issue appeared first on The GitHub Blog.

]]>
We've added GraphQL API support for creating a branch linked to an issue. Learn more about creating a branch for an issue in the UI in the documentation.

The GraphQL API supports:

The post GraphQL APIs for creating a branch linked to an issue appeared first on The GitHub Blog.

]]>
68343
New Branch Protections: Last Pusher and Locked Branch https://github.blog/changelog/2022-10-20-new-branch-protections-last-pusher-and-locked-branch Thu, 20 Oct 2022 15:34:58 +0000 https://github.blog/changelog/2022-10-20-new-branch-protections-last-pusher-and-locked-branch New Branch Protections: Last Pusher and Locked Branch

The post New Branch Protections: Last Pusher and Locked Branch appeared first on The GitHub Blog.

]]>
Today we're releasing two new branch protections.

Require approval from someone other than the last pusher

Now, before a pull request can be merged, you can require it to be approved by someone other than the last pusher.
Meaning, the most recent user to push their changes will need a pull request approval regardless of the Require approvals branch protection. Or in the case of 1 approval required, someone other than the last user to push their changes will also need to approve. If the approvals come from other folks than the last pusher, those two approvals will be sufficient.

Screenshot of Last Push protection enabled.

Lock branch

This allows for branches to be locked, prohibiting changes. You can lock a branch allowing you to have a maintenance window and prevent changes, or to protect a fork so it only receives changes from its upstream repository.

To use this feature in a branch protection rule, enable Lock branch.

Screenshot of Lock branch with fork sync enabled

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

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

The post New Branch Protections: Last Pusher and Locked Branch appeared first on The GitHub Blog.

]]>
68006