'receive.denyCurrentBranch' configuration variable to 'refuse' code example
Example: 'receive.denyCurrentBranch' configuration variable to 'refuse'
# remote
$ git config receive.denyCurrentBranch ignore
# local
then you can push at local
# remote
$ git config receive.denyCurrentBranch ignore
# local
then you can push at local