GitHub Brings Out Feature To Prevent Project Code Loss

GitHub Brings Out Feature To Prevent Project Code Loss
Facebook may have decided that you shouldn’t see the news, but we think you deserve to be in the know with Lifehacker Australia’s content. To sign up for our daily newsletter covering the latest news, hacks and reviews, head HERE. For a running feed of all our stories, follow us on Twitter HERE. Or you can bookmark the Lifehacker Australia homepage to visit whenever you need a fix.

At any given time, there could be a few developers working on the same project where the code is stored as a branch in a repository on GitHub. Trouble is, when different people are collaborating on the same code, there is always a chance that one person can overwrite someone else’s changes, resulting in lost work. GitHub has introduced a feature called Protected Branches to prevent this from happening.

Protected Brances allows repository administrators to disable force push changes to particular parts of a given project. This prevents the branch from being overwritten or deleted. Changes cannot be merged into a protected branch until status checks have been passed.

The new Protected Branch will be gradually rolled out on GitHub in the coming weeks. You can read more about it over at GitHub’s blog post.

[Via GitHub blog post]