From: Kipras Melnikovas <kipras@kipras.org>
To: spectral@google.com
Cc: git@vger.kernel.org, kipras@kipras.org, rsbecker@nexbridge.com,
wyattscarpenter@gmail.com
Subject: Re: Short form of --force-with-lease
Date: Fri, 12 Apr 2024 12:00:36 +0300 [thread overview]
Message-ID: <20240412090035.87612-2-kipras@kipras.org> (raw)
In-Reply-To: <CAO_smVhB0QUomdSxGqwvFKrb53NGMZE+y=3zbRnQX+ciLRZyOw@mail.gmail.com>
> > > 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'
> >
> > Correct, and I already have an alias:
> > 'pf = push --force-with-lease --force-if-includes'.
> >
> > However, I see the config option more valuable - it would protect against
> > accidental `push -f`, which, out of habit, is very probable to run on accident.
> > With the config option, would feel safe and wouldn't need the alias either.
>
> It would normalize the use of `push -f` in people's muscle memory,
> which would be a potential disaster if someone lost their
> configuration, but not this muscle memory. It also would break
> automation/scripts - `git push` is likely used by both humans and
> automation <...>. A separate flag (or just using an alias if it's for
> saving typing) would be safer.
Fair point, I retract my config option proposal.
A separate flag, as proposed by OP, would make more sense. Thanks.
next prev parent reply other threads:[~2024-04-12 9:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-11 17:16 Short form of --force-with-lease Wyatt Carpenter
2024-04-11 17:36 ` Kipras Melnikovas
2024-04-11 19:21 ` rsbecker
2024-04-11 20:32 ` Kipras Melnikovas
2024-04-11 20:58 ` Kyle Lippincott
2024-04-12 9:00 ` Kipras Melnikovas [this message]
2024-04-11 21:30 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240412090035.87612-2-kipras@kipras.org \
--to=kipras@kipras.org \
--cc=git@vger.kernel.org \
--cc=rsbecker@nexbridge.com \
--cc=spectral@google.com \
--cc=wyattscarpenter@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).