All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Jasdeep Khalsa <jasdeepkhalsa1@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Adding new/create & del/delete aliases into git
Date: Fri, 17 Dec 2021 00:43:48 +0100	[thread overview]
Message-ID: <211217.86ee6c9kqv.gmgdl@evledraar.gmail.com> (raw)
In-Reply-To: <CALtRjJ3bu1ub=407kt-aemfV6BU8CfPZJxLRG5WgTZBYWbaXCQ@mail.gmail.com>


On Thu, Dec 16 2021, Jasdeep Khalsa wrote:

> Hi there Git Community!
>
> I've been using the following aliases for a long time:
>
> del or delete = branch -D
> new or create = checkout -b
>
> And I feel these are good candidates as an addition into the core git
> API as they provide an easy way for new starters to understand the
> creating and deleting of branches - which is arguably one of the most
> common git operations.

As a general advice if we're providing any sort of sugar / default flags
either as a guide or as aliases for newcomers it's probably good to not
do so with --force, i.e. your -D will shred data users might still want,
better to make it a -d. You can always add -D when needed.

> In comparison, passing in flags for this purpose for new starters to
> git, is both hard to remember and not easy or obvious to understand
> what is going on.
>
> From my understanding, these flags were also meant as a shortcut to do
> a git branch && git checkout in one operation - effectively being
> alias flags anyway.
>
> So I wanted to reach out to find out what appetite there may be out
> there to add/change these to be simpler for new starters to git :)
>
> Thanks for considering my proposal and happy to discuss any thoughts!
>
> Jasdeep
>
> https://github.com/jasdeepkhalsa

There was a more extensive proposal discussed on-list recently here:
https://lore.kernel.org/git/20210702100506.1422429-6-felipe.contreras@gmail.com/

I think if you're interested reading that & using some of the things
that came up there as a jumping-off point would be a good place to
start.


  reply	other threads:[~2021-12-16 23:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-16 13:29 Adding new/create & del/delete aliases into git Jasdeep Khalsa
2021-12-16 23:43 ` Ævar Arnfjörð Bjarmason [this message]
2021-12-17  0:57 ` 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=211217.86ee6c9kqv.gmgdl@evledraar.gmail.com \
    --to=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jasdeepkhalsa1@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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.