git push –force-with-lease vs. –force

I am trying to understand the difference between

git push --force

and

git push --force-with-lease

My guess is that the latter only pushes to the remote if the remote has commits that the local branch doesn’t have?

5 Answers
5

Leave a Comment