#4367 git repositories don't allow git push --force
Closed: Fixed Opened by purpleidea.

= bug description =

Most git repositories allow: git push --force
This is not recommended usually for git master, but is quite common for feature branches that get rebased. It is also sometimes very useful on git master in an emergency.

= bug analysis =

Example:

$ git push fedorahosted master --force
Counting objects: 327, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (245/245), done.
Writing objects: 100% (260/260), 646.23 KiB | 0 bytes/s, done.
Total 260 (delta 157), reused 0 (delta 0)
remote: error: denying non-fast-forward refs/heads/master (you should pull first)
To ssh://@git.fedorahosted.org/git/.git
! [remote rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'ssh://@git.fedorahosted.org/git/.git'

= fix recommendation =
There's a config option that is set that is blocking this :)
Please change it


This is by design/intended. All our repos are created with:

denyNonFastforwards = true

We are open to changing the option on a per repo basis if the owners of that repo understand the consquences: mainly that in some cases this can cause commits to be lost.

We are not going to change it for all repos.

Replying to [comment:1 kevin]:

This is by design/intended. All our repos are created with:

denyNonFastforwards = true

We are open to changing the option on a per repo basis if the owners of that repo understand the consquences: mainly that in some cases this can cause commits to be lost.

Sounds good. Please change it for the puppet-gluster repo. Thanks :)

We are not going to change it for all repos.
That makes sense!

Alright done.

Metadata