In git when doing a push
if the local and remote branches do not agree, it is necessary to do a force push
(although it is not well seen to do a force push
). In git there are two options for this option --force
and option --force-with-lease
.
By the name it seems that --force-with-lease
is less aggressive or does not always push but I would like to know what is the difference between these two options.
Ex: git push origin master --foce
vs git push origin master --force-with-lease