Thread (1 message) 1 message, 1 author, 2021-10-21

Re: changing the experimental 'git switch'

From: Junio C Hamano <hidden>
Date: 2021-10-21 23:03:39

Ævar Arnfjörð Bjarmason [off-list ref] writes:
    | Switch with --merge       | git switch -m branch   | git switch --merge branch |
    | Create                    | git switch -c new      | git switch -n new         |
    | Create from existing      | N/A                    | git switch -c new [<old>] |
I agree that adding a way to "clone", which is missing from
"checkout/switch/branch", is a good idea.  I do not necessarily
think it is a good idea to say "-n" is "new" or "-c" is not "create"
but is "clone/copy".  As you said yourself in a later paragraph,
"-n" sometimes is "--dry-run", and as we can see here "-c" in the
context of a command that can create and clone (with two verbs
behaving differently) is ambiguous.

Starting with a spelled out --copy vs --create without muddying the
water with -n may be a sensible way forward.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help