#3224 allow to push non-fast-forward changes
Closed: Fixed Opened by npajkovs.

= bug description =
I'd like to push non-fast-forward changes to mine project. Actually server refuses any non-fast-forward changes

{{{
[master $% u-6]$ git push origin +master:master
Total 0 (delta 0), reused 0 (delta 0)
remote: error: denying non-fast-forward refs/heads/master (you should pull first)
To ssh://git.fedorahosted.org/git/iptraf-ng.git
! [remote rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'ssh://git.fedorahosted.org/git/iptraf-ng.git'
}}}

= fix recommendation =
be pushed without any complains


We can change this hook to let you do so now, but the reason for that hook is that if you make fast forward changes disconnected people who have cloned your repo will have their history re-written, so it's a bad practice to leave this always available.

Can you let me know when you have pushed your history re-writing changes and I can set it back?

Replying to [comment:1 kevin]:

We can change this hook to let you do so now, but the reason for that hook is that if you make fast forward changes disconnected people who have cloned your repo will have their history re-written, so it's a bad practice to leave this always available.

I know this is bad practice, but I have only one really active developer and he is waiting for non-fast-forward (rewriting history) to make his changes fit to rewritten history.

everyone else will have rewritten history without any big pain in the ass ;)

Can you let me know when you have pushed your history re-writing changes and I can set it back?

I can't do it right now, so I'm asking to allow me to rewrite history. without that possibility I'd have to change git repo where I can rewrite my history without any problems.

I've changed it to allow fast forwards. You can make your changes.

I really think it's a bad idea to always allow them. People consuming your repo will never know if they have the current correct history or if things disappear. Part of what a SCM is is something that keeps a valid and consistent history. I know there's cases where you have to change that, but I would strongly advise not to always allow it.

Replying to [comment:3 kevin]:

I've changed it to allow fast forwards. You can make your changes.

Thank you.

I really think it's a bad idea to always allow them. People consuming your repo will never know if they have the current correct history or if things disappear. Part of what a SCM is is something that keeps a valid and consistent history. I know there's cases where you have to change that, but I would strongly advise not to always allow it.

I'm not going to use it regularly ;)

Metadata