Protecting Git Branches

I’ve been thinking about the vulnerability of the primary Git branch for the last several weeks. Mostly out of paranoia about destroying a critical application. I added protective measures to my local clones on important projects and was content in thinking that I was now safe. But today I was reminded that this is only a small part of protecting a collaborative project. Here’s what happened: User 1 made a commit on master and pushed to origin User 2 fixed a bad merge on branch feature and ran git push --force User 1 made a tag directly on the remote and deployed to Production User 1 saw the new tag in production, but the new commit was missing The problem was introduced with the git push --force....

2016-09-15 · 2 min · 356 words · Nathaniel Hoag