Subject: RE: Short form of --force-with-lease

From: <[email-masked]>
Date: Thu, 11 Apr 2024 15:21:00 -0400

On Thursday, April 11, 2024 1:37 PM, Kipras Melnikovas wrote:
>I'd suggest a config option "push.forceFlagBehavior" that would allow to
configure
>the behavior, one of:
>- "default" / "overwrite", which is currently -f,
>- "lease" for --force-with-lease,
>- "lease-includes"  for --force-with-lease --force-if-includes,
>- possibly others.
>
>Then, upon `git push -f`, the config option would be consulted to determine
the
>behavior.
>
>To get the default behavior, `-f -f` or `-F` could be used.

If this is mostly about saving typing, you could get a similar effect adding
an alias. Something like

git config --global alias.pushfl 'push --force-with-lease'