1
當我打算在我的本地存儲庫(應該在git commit後停止)時,我意外地使用git push將項目推送到了Git。撤消'git push'的問題
我想撤消這個git push,這樣服務器repo就會回到特定的提交。我已經看過了,如this one其他問題,但混帳推-f不爲我工作,並拉起錯誤:To prevent you from losing history, non-fast-forward updates were rejected.
git push -f origin CommitSHA:mainline
我以爲-f標籤將迫使推我甚至嘗試不管我是否在推動之前的提交。我應該如何解決這個錯誤,以便我可以撤消git push?