$ ./guess_the_languageGit
Git · hard · #59

Why was this forced push refused?

$ git push --force-with-lease
 ! [rejected]        main -> main (stale info)
  1. The branch is protected on the remote server
  2. Lease pushes need admin rights
  3. Your branch has no upstream set
  4. The remote moved since your last fetch
--force-with-lease only overwrites if the remote ref still matches your remote-tracking ref, protecting commits you have not seen.
Play Git ▸