Make git repo push only (pull only with a -f flag)

40 Views Asked by At

We have git repos on our production remotes (OpenShift). We have this system:

git push openshift-remote-dev dev:master -f # push to DEV production server
git push openshift-remote-stg release:master -f # push release branch to STG production server
git push openshift-remote-prod master:master -f # push master to PROD production server

We use the --force flag just because there are some times where the code is not synced up. And frankly it doesn't matter, we should never have to merge code from these remotes. It just saves any possible hassle that is totally pointless as far as I can tell.

I am thinking that we should never pull code from these remotes. No changes should be made directly to the code on the remotes.

My question is - is there a way to somehow prevent people from pulling from these remotes without a force flag?

0

There are 0 best solutions below