QuestenaPractice that shows what to review next
Question 9

How does `git push --force-with-lease` differ from `git push --force`?

  1. It refuses the push if the remote branch no longer matches your remote-tracking ref; --force skips this client-side checkCorrect answer
  2. It forces the push only for the current branch, while `--force` force-pushes every branch configured for the remote
  3. It asks the server for permission and requires a repository administrator to approve the push
  4. It is an alias for `--force` kept for backwards compatibility

Explanation

`--force-with-lease` is a conditional force: the push succeeds only if the remote ref still has the value you expect (by default, your remote-tracking branch). If a teammate pushed in the meantime, the remote ref has moved, the lease check fails, and the push is rejected — whereas plain `--force` skips the check and can overwrite their work (the server may still enforce rules of its own). There is no admin-approval mechanism, and neither flag changes which branches are pushed.

Continue with this test

Start practice
Question 9: How does `git push --force-with-lease` differ from `git… · Git Fundamentals · Questena