Ticket #26424 (closed: fixed)
way to allow non-fast-forward commits in git?
|Reported by:||jnewsome||Owned by:||ctsai|
My immediate problem is that I forgot to specify --no-ff when I merged a topic branch into master locally (which is the convention in our project) and then pushed before I realized my mistake.
I think I can fix it up by resetting the remote master to an earlier commit and then redoing the merge, but this appears to be forbidden.
git push --force 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://email@example.com/p/xmhf/xmhf ! [remote rejected] master -> master (non-fast-forward) error: failed to push some refs to 'ssh://firstname.lastname@example.org/p/xmhf/xmhf'
I tried logging in and changing the permissions in the repository directly, but it appears to have no effect. I'm not sure that I'm modifying the "real" git repository, since doing a find doesn't show any objects.
ssh -t jnewsome,email@example.com [jnewsome@shell-21001 ~]$ cd /home/scm_git/xmhf/xmhf/ [jnewsome@shell-21001 xmhf]$ vi config # set denyNonFastforwards to false [jnewsome@shell-21001 xmhf]$ find . . ./branches ./hooks ./info ./info/exclude ./objects ./objects/info ./objects/pack ./refs ./refs/heads ./refs/tags ./HEAD ./config ./description