1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Ticket #9187 (closed: self-service)

Opened 4 years ago

Last modified 4 years ago

git push --force won't work

Reported by: tuxjay Owned by: nhruby
Keywords: SOG Cc:
Private: no


I want to rewrite some project history so:

dupont chilon % git push --force sourceforge master
Total 0 (delta 0), reused 0 (delta 0)
error: denying non-fast forward refs/heads/master (you should pull first)
To ssh://tuxjay@chilon.git.sourceforge.net/gitroot/chilon/chilon

! [remote rejected] master -> master (non-fast forward)

error: failed to push some refs to 'ssh://tuxjay@chilon.git.sourceforge.net/gitroot/chilon/chilon'

This works on my own git server, and on gitorious and github.

Change History

Changed 4 years ago by ctsai

  • keywords SOG added
  • owner set to nhruby
  • status changed from new to assigned

Changed 4 years ago by nhruby

  • status changed from assigned to closed
  • resolution set to self-service


You repo has denyNonFastforwards set which is preventing your push from succeeding. You should perform a pull operation from your defined sourceforge remote in order to be up-to-date and then perform the push.

Alternatively, you may wish to enable fastForwards for this particular push, which you may do by editing the config file for this repo. Instructions for getting to the SourceForge repo can be found at:

NOTE: fastForwarding a rewrite of revision history can cause problems for people who pull from your repo, I would strongly encourage you to back up your repo prior to performing this push and test extensively where possible.


nathan hruby
System Programmer/Analyst

Note: See TracTickets for help on using tickets.