From: Martin Date: Sun, 11 Jul 2021 09:10:08 GMT Subject: Re: PATCH: improve git switch documentation Message-ID: <1e18c4ed-6975-5041-4b4f-75c4d3d21860@mfriebe.de> In-Reply-To: <60ea2eb562f26_2a69208e8@natae.notmuch> On 11/07/2021 01:35, Felipe Contreras wrote: > Martin wrote: >> At the end of the current or rewritten "-C" doc, add: >> > This can drop commits >> >> 4 words. All that is needed. > > OK. I'm not opposed to that, that would definitely be an improvement > from the current text. > > What I'm saying is that if we are trying to improve the text, it would > behoove us to consider all other options, and instead if adding a note > at the end (which is correct), reconsider the whole thing to *start* > with what's important: Ah, ok. So we have been missing each others point. > Instead of this: > > -C :: > --force-create :: > Similar to `--create` except that if `` already > exists, it will be reset to ``. This is a > convenient shortcut for: > + > ------------ > $ git branch -f > $ git switch > ------------ > > Do this: > > -N :: > Create a new branch like '--new', but if it already exists reset it > like '--reset'. As I said, I try to avoid reset, and also there is no "--reset" to match. Only a "reset" command, and it does a wide range of diff things -force-new -N See the --new option. Allows to [re-]use the name of an existing branch. This may drop commits of that branch. Or See the --new option. Can use the name of an existing branch. Removing that branch may drop commits. If needs must "Removing" => "Resetting" Or even shorter See the --new option. Allows to re-use a branch-name and may drop commits [resetting it].