Home How GitHub Aims To Safeguard Your Project’s Code

How GitHub Aims To Safeguard Your Project’s Code

Thing can get confusing in GitHub, the popular repository where as many as 10 million developers stash code, collaborate or build off of someone else’s efforts. In that milieu, it’s easy for users to get lost and accidentally overwrite other people’s work. But that may change, as the organization announced a new feature Thursday to help administrators prevent such catastrophes.

The new Protected Branches feature, available in a few weeks, will let repository owners safeguard their source code from contributors who “force push” changes on top of certain, valuable parts of their projects. 

“When it’s enabled for your repositories you’ll be able to go to the Branches tab in repository settings and protect branches,” wrote GitHub designer and product manager Ben Bleikamp in the official blog post. Once they’re ready for the fray, they can pull the trigger and let in the community. 

Safety First

Once you protect a branch, it cannot be overwritten or deleted. It will also use status checks to the master branch, and block any attempts at merges, if the branch is not up to date.

See also: How To Win Friends And Make Pull Requests On GitHub

Although GitHub offers “undo” commands, which nix errors by reverting to an earlier version, the steps vary depending on the issue. Undo commands are also reactive measures after the changes have been committed. 

In contrast, Protected Branches stops the overwriting before it happens. Together, they make for a toolbox of sorts so administrators can battle wayward issues.

Not everyone may be happy with the new feature, though. Some contributors could get frustrated by being barred from certain areas. But this type of control is essential for high-value software (like code used in business applications). 

Hopefully now, no one will ever have to suffer seeing months of their critical work get vaporized. 

Images courtesy of GitHub

About ReadWrite’s Editorial Process

The ReadWrite Editorial policy involves closely monitoring the tech industry for major developments, new product launches, AI breakthroughs, video game releases and other newsworthy events. Editors assign relevant stories to staff writers or freelance contributors with expertise in each particular topic area. Before publication, articles go through a rigorous round of editing for accuracy, clarity, and to ensure adherence to ReadWrite's style guidelines.

Get the biggest tech headlines of the day delivered to your inbox

    By signing up, you agree to our Terms and Privacy Policy. Unsubscribe anytime.

    Tech News

    Explore the latest in tech with our Tech News. We cut through the noise for concise, relevant updates, keeping you informed about the rapidly evolving tech landscape with curated content that separates signal from noise.

    In-Depth Tech Stories

    Explore tech impact in In-Depth Stories. Narrative data journalism offers comprehensive analyses, revealing stories behind data. Understand industry trends for a deeper perspective on tech's intricate relationships with society.

    Expert Reviews

    Empower decisions with Expert Reviews, merging industry expertise and insightful analysis. Delve into tech intricacies, get the best deals, and stay ahead with our trustworthy guide to navigating the ever-changing tech market.