What does `git push --force-with-lease` protect against?

IntermediateConceptGit
Answer

It refuses the force-push if the remote branch has moved since you last fetched, so you don't wipe a teammate's commits by accident.

All Real-World Interview questions Roadmap: Interview readiness

More on Git