git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
rsbecker@nexbridge.com <rsbecker@nexbridge.com>
Date
Apr 11, 2024, 19:21 UTC
Message-ID
<01e101da8c45$66d33240$347996c0$@nexbridge.com>
In-Reply-To
<20240411173639.81152-2-kipras@kipras.org>
On Thursday, April 11, 2024 1:37 PM, Kipras Melnikovas wrote:
>I'd suggest a config option "push.forceFlagBehavior" that would allow to
configure
Show 7 quoted lines
>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'
Previous: Kipras MelnikovasNext: Kipras Melnikovas
Message 3 of 7 in “Short form of --force-with-lease”
  1. Wyatt CarpenterApr 11, 2024
  2. Kipras MelnikovasApr 11, 2024
  3. rsbecker@nexbridge.comApr 11, 2024
  4. Kipras MelnikovasApr 11, 2024
  5. Kyle LippincottApr 11, 2024
  6. Kipras MelnikovasApr 12, 2024
  7. Junio C HamanoApr 11, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.