From: Martin Date: Sun, 24 Oct 2021 06:54:12 GMT Subject: Re: changing the experimental 'git switch' (was: [Summit topic] Improving Git UX) Message-ID: In-Reply-To: <9c6b3041-a5c0-6fe1-860e-7bfcb292ae81@mfriebe.de> On 22/10/2021 16:04, martin wrote: > Unless there is more, than the copying of the reflog, wouldn't it be > better to add an option "--copy-reflog" Ok, I found the answer (actually 2 / see other mail) > The |-c| and |-C| options have the exact same semantics as |-m| and > |-M|, except instead of the branch being renamed, it will be copied to > a new name, along with its config and reflog. As for the "config" being part depends on which part of the man-page one reads. But, anyway on the topic of "git switch" Copying a branch (and maybe moving too) could be seen as an extension to creating a new one. After all, after the copy operation there is a newly created branch. Only it has some more data with it. So one could do git switch  --settings-from --create    git switch  -s    -c    "settings-from" is just an example, there may be better names for it. Ideally not starting with a "c". And using a name different from "copy" may be more accurate, because unless it is created on the same one to which the points, then its at best partially copied. On top of that options could be brought in, to copy only reflog or only config. Using the above with an --force-create / -C would make it a "move branch". In this case there could be a shortcut, if and (the old)   are the same.