I'm trying to rollback a Git repository on SourceForge. I tried the following:
git reset --hard 9ac2e31ca4a155d4c36780b4329626045a7f40ed
HEAD ist jetzt bei 9ac2e31 Fix warnings
git push -f origin 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 protected]/p/project/code
! [remote rejected] master -> master (non-fast-forward)
error: Fehler beim Versenden einiger Referenzen nach 'ssh://[email protected]/p/project/code'
How can I override the master
branch for a remote SourceForge Git repository?
Since denyNonFastforwards
is a server-side config, you need to access to your repo on the SourceForge side somehow.
As your ticket mentions, this is done with an interactive shell service, but that supposes you can use ssh to open a secure shell.
Running "
sf-help --scm
" in the shell will show you your repo paths.
Just tweak thedenyNonFastforwards = true
tofalse
for a bit, do your push, and then set it back totrue
(for safety).
However, a message like "ssh: connect to host shell.sourceforge.net port 22: Connection refused
" could mean that:
Double-check the SourceForge SSH documentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With