Prevent accidental git-push in a simple step

If you have push access to an upstream repository and want to avoid accidental push, checkout the simple solution below. Freedom is choosing your responsibility. It’s not having no responsibilities; it’s choosing the ones you want. Let’s set the context I will call the original repository as upstream My fork for that repository will be called as origin 90% of times I push to origin and then create pull request, but few times I push directly to upstream(create new branch or update existing one). ...

February 8, 2018 · Pranav Gore