{"thread":{"id":"59049","subject":"[PATCH] doc: use \"git switch -c\" rather than \"git checkout -b\" consistently","startedAt":"2023-01-08T08:24:07Z","lastAt":"2023-01-13T18:04:16Z","messageCount":14,"participants":["Yutaro Ohno via GitGitGadget","Junio C Hamano","Eric Sunshine","Yutaro Ohno","rsbecker@nexbridge.com","Ævar Arnfjörð Bjarmason"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"469908","messageId":"pull.1422.git.git.1673166241185.gitgitgadget@gmail.com","threadId":"59049","inReplyTo":null,"subject":"[PATCH] doc: use \"git switch -c\" rather than \"git checkout -b\" consistently","fromName":"Yutaro Ohno via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2023-01-08T08:24:01Z","receivedAt":"2023-01-08T08:24:07Z","isPatch":true,"sender":{"key":"yutaro.ono.418@gmail.com","avatar":"https://avatars.githubusercontent.com/u/24674436?v=4"},"body":"From: Yutaro Ohno <yutaro.ono.418@gmail.com>\n\nIn the \"DETACHED HEAD\" section in the git-checkout doc, it suggests\nusing \"git checkout -b <branch-name>\" to create a new branch on the\ndetached head.\n\nOn the other hand, when you checkout a commit that is not at the tip of\nany named branch (e.g., when you checkout a tag), git suggests using\n\"git switch -c <branch-name>\".\n\nUse \"git switch -c\" and fix this inconsistency.\n\nSigned-off-by: Yutaro Ohno <yutaro.ono.418@gmail.com>\n---\n    doc: use \"git switch -c\" rather than \"git checkout -b\" consistently\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1422%2Fohno418%2Fimprove-git-checkout-doc-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1422/ohno418/improve-git-checkout-doc-v1\nPull-Request: https://github.com/git/git/pull/1422\n\n Documentation/git-checkout.txt | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt\nindex 4cb9d555b4b..ba3d6164847 100644\n--- a/Documentation/git-checkout.txt\n+++ b/Documentation/git-checkout.txt\n@@ -477,9 +477,9 @@ before that happens. If we have not yet moved away from commit `f`,\n any of these will create a reference to it:\n \n ------------\n-$ git checkout -b foo   <1>\n-$ git branch foo        <2>\n-$ git tag foo           <3>\n+$ git switch -c foo   <1>\n+$ git branch foo      <2>\n+$ git tag foo         <3>\n ------------\n \n <1> creates a new branch `foo`, which refers to commit `f`, and then\n\nbase-commit: 2b4f5a4e4bb102ac8d967cea653ed753b608193c\n-- \ngitgitgadget\n"},{"id":"469938","messageId":"xmqqbkn8wcqo.fsf@gitster.g","threadId":"59049","inReplyTo":"pull.1422.git.git.1673166241185.gitgitgadget@gmail.com","subject":"Re: [PATCH] doc: use \"git switch -c\" rather than \"git checkout -b\" consistently","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2023-01-09T04:30:55Z","receivedAt":"2023-01-09T04:36:06Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Yutaro Ohno via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> From: Yutaro Ohno <yutaro.ono.418@gmail.com>\n> Subject: Re: [PATCH] doc: use \"git switch -c\" rather than \"git checkout -b\" consistently\n\nHmph.  When two things work equally well, is it a good idea to\ndescribe only one \"consistently\", or mention both that can be used\npretty much interchangeably in different places?  I am not 100% sure\n\"consistently\" is a good thing here.\n\nThoughts from others?\n"},{"id":"469941","messageId":"CAPig+cQe_VMW2KV+ZyZwosFw07Q+hePryDVushRJ-jFfD4yzpw@mail.gmail.com","threadId":"59049","inReplyTo":"xmqqbkn8wcqo.fsf@gitster.g","subject":"Re: [PATCH] doc: use \"git switch -c\" rather than \"git checkout -b\" consistently","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2023-01-09T04:48:46Z","receivedAt":"2023-01-09T04:49:04Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Sun, Jan 8, 2023 at 11:36 PM Junio C Hamano <gitster@pobox.com> wrote:\n> > From: Yutaro Ohno <yutaro.ono.418@gmail.com>\n> > Subject: Re: [PATCH] doc: use \"git switch -c\" rather than \"git checkout -b\" consistently\n>\n> Hmph.  When two things work equally well, is it a good idea to\n> describe only one \"consistently\", or mention both that can be used\n> pretty much interchangeably in different places?  I am not 100% sure\n> \"consistently\" is a good thing here.\n>\n> Thoughts from others?\n\nPerhaps if the patch was sold as filling in a gap left by 328c6cb853\n(doc: promote \"git switch\", 2019-03-29) it would be more palatable.\n\nIt does feel a bit strange that within the git-checkout documentation,\nthis patch is replacing an example invocation of git-checkout with an\ninvocation of git-switch. However, as the list of commands the patch\ntouches is given merely as examples one might use, then I could see\ngit-switch being prepended to the list rather than entirely replacing\ngit-checkout. For instance:\n\n    If we have not yet moved away from commit `f`,\n    any of these will create a reference to it:\n\n    ------------\n    $ git switch -c foo     <1>\n    $ git checkout -b foo   <1>\n    $ git branch foo        <2>\n    $ git tag foo           <3>\n    ------------\n"},{"id":"469946","messageId":"xmqqk01wusmz.fsf@gitster.g","threadId":"59049","inReplyTo":"CAPig+cQe_VMW2KV+ZyZwosFw07Q+hePryDVushRJ-jFfD4yzpw@mail.gmail.com","subject":"Re: [PATCH] doc: use \"git switch -c\" rather than \"git checkout -b\" consistently","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2023-01-09T06:30:28Z","receivedAt":"2023-01-09T06:31:48Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Sunshine <sunshine@sunshineco.com> writes:\n\n> touches is given merely as examples one might use, then I could see\n> git-switch being prepended to the list rather than entirely replacing\n> git-checkout. For instance:\n>\n>     If we have not yet moved away from commit `f`,\n>     any of these will create a reference to it:\n>\n>     ------------\n>     $ git switch -c foo     <1>\n>     $ git checkout -b foo   <1>\n>     $ git branch foo        <2>\n>     $ git tag foo           <3>\n>     ------------\n\nThat can invite \"do we need to use checkout after doing switch?\"\nconfusion.  I would understand if it were\n\n\t$ git checkout -b foo # or \"git switch -c foo\" <1>\n\nor something that makes it clear either one, but not both, is used\nthere.\n\nThanks.\n\n"},{"id":"469947","messageId":"CAPig+cTO1jBjcwjX4UpxG813OwrDAaYVvViC_XGWorwbXvOfvw@mail.gmail.com","threadId":"59049","inReplyTo":"xmqqk01wusmz.fsf@gitster.g","subject":"Re: [PATCH] doc: use \"git switch -c\" rather than \"git checkout -b\" consistently","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2023-01-09T06:32:34Z","receivedAt":"2023-01-09T06:32:53Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Mon, Jan 9, 2023 at 1:30 AM Junio C Hamano <gitster@pobox.com> wrote:\n> Eric Sunshine <sunshine@sunshineco.com> writes:\n> > touches is given merely as examples one might use, then I could see\n> > git-switch being prepended to the list rather than entirely replacing\n> > git-checkout. For instance:\n> >\n> >     $ git switch -c foo     <1>\n> >     $ git checkout -b foo   <1>\n> >     $ git branch foo        <2>\n> >     $ git tag foo           <3>\n>\n> That can invite \"do we need to use checkout after doing switch?\"\n> confusion.  I would understand if it were\n>\n>         $ git checkout -b foo # or \"git switch -c foo\" <1>\n>\n> or something that makes it clear either one, but not both, is used\n> there.\n\nThat refinement looks good to me.\n"},{"id":"469951","messageId":"20230109084743.328294-1-yutaro.ono.418@gmail.com","threadId":"59049","inReplyTo":"CAPig+cTO1jBjcwjX4UpxG813OwrDAaYVvViC_XGWorwbXvOfvw@mail.gmail.com","subject":"Re: [PATCH] doc: use \"git switch -c\" rather than \"git checkout -b\" consistently","fromName":"Yutaro Ohno","fromEmail":"yutaro.ono.418@gmail.com","sentAt":"2023-01-09T08:47:43Z","receivedAt":"2023-01-09T08:56:21Z","isPatch":true,"sender":{"key":"yutaro.ono.418@gmail.com","avatar":"https://avatars.githubusercontent.com/u/24674436?v=4"},"body":"Eric Sunshine <sunshine@sunshineco.com> wrote:\n> On Mon, Jan 9, 2023 at 1:30 AM Junio C Hamano <gitster@pobox.com> wrote:\n> > Eric Sunshine <sunshine@sunshineco.com> writes:\n> > > touches is given merely as examples one might use, then I could see\n> > > git-switch being prepended to the list rather than entirely replacing\n> > > git-checkout. For instance:\n> > >\n> > >     $ git switch -c foo     <1>\n> > >     $ git checkout -b foo   <1>\n> > >     $ git branch foo        <2>\n> > >     $ git tag foo           <3>\n> >\n> > That can invite \"do we need to use checkout after doing switch?\"\n> > confusion.  I would understand if it were\n> >\n> >         $ git checkout -b foo # or \"git switch -c foo\" <1>\n> >\n> > or something that makes it clear either one, but not both, is used\n> > there.\n\nThis looks good. I'll send a v2 patch. Thank you!\n"},{"id":"469963","messageId":"pull.1422.v2.git.git.1673261237449.gitgitgadget@gmail.com","threadId":"59049","inReplyTo":"pull.1422.git.git.1673166241185.gitgitgadget@gmail.com","subject":"[PATCH v2] doc: add \"git switch -c\" as another option on detached HEAD","fromName":"Yutaro Ohno via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2023-01-09T10:47:17Z","receivedAt":"2023-01-09T10:47:53Z","isPatch":true,"sender":{"key":"yutaro.ono.418@gmail.com","avatar":"https://avatars.githubusercontent.com/u/24674436?v=4"},"body":"From: Yutaro Ohno <yutaro.ono.418@gmail.com>\n\nIn the \"DETACHED HEAD\" section in the git-checkout doc, it suggests\nusing \"git checkout -b <branch-name>\" to create a new branch on the\ndetached head.\n\nOn the other hand, when you checkout a commit that is not at the tip of\nany named branch (e.g., when you checkout a tag), git suggests using\n\"git switch -c <branch-name>\".\n\nAdd \"git switch -c\" as another option and mitigate this inconsistency.\n\nSigned-off-by: Yutaro Ohno <yutaro.ono.418@gmail.com>\n---\n    doc: add \"git switch -c\" as another option on detached HEAD\n    \n    cc: Eric Sunshine sunshine@sunshineco.com\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1422%2Fohno418%2Fimprove-git-checkout-doc-v2\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1422/ohno418/improve-git-checkout-doc-v2\nPull-Request: https://github.com/git/git/pull/1422\n\nRange-diff vs v1:\n\n 1:  b7a11452979 ! 1:  2103912b406 doc: use \"git switch -c\" rather than \"git checkout -b\" consistently\n     @@ Metadata\n      Author: Yutaro Ohno <yutaro.ono.418@gmail.com>\n      \n       ## Commit message ##\n     -    doc: use \"git switch -c\" rather than \"git checkout -b\" consistently\n     +    doc: add \"git switch -c\" as another option on detached HEAD\n      \n          In the \"DETACHED HEAD\" section in the git-checkout doc, it suggests\n          using \"git checkout -b <branch-name>\" to create a new branch on the\n     @@ Commit message\n          any named branch (e.g., when you checkout a tag), git suggests using\n          \"git switch -c <branch-name>\".\n      \n     -    Use \"git switch -c\" and fix this inconsistency.\n     +    Add \"git switch -c\" as another option and mitigate this inconsistency.\n      \n          Signed-off-by: Yutaro Ohno <yutaro.ono.418@gmail.com>\n      \n     @@ Documentation/git-checkout.txt: before that happens. If we have not yet moved aw\n      -$ git checkout -b foo   <1>\n      -$ git branch foo        <2>\n      -$ git tag foo           <3>\n     -+$ git switch -c foo   <1>\n     -+$ git branch foo      <2>\n     -+$ git tag foo         <3>\n     ++$ git checkout -b foo  # or \"git switch -c foo\"  <1>\n     ++$ git branch foo                                 <2>\n     ++$ git tag foo                                    <3>\n       ------------\n       \n       <1> creates a new branch `foo`, which refers to commit `f`, and then\n\n\n Documentation/git-checkout.txt | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt\nindex 4cb9d555b4b..9f116acdbd6 100644\n--- a/Documentation/git-checkout.txt\n+++ b/Documentation/git-checkout.txt\n@@ -477,9 +477,9 @@ before that happens. If we have not yet moved away from commit `f`,\n any of these will create a reference to it:\n \n ------------\n-$ git checkout -b foo   <1>\n-$ git branch foo        <2>\n-$ git tag foo           <3>\n+$ git checkout -b foo  # or \"git switch -c foo\"  <1>\n+$ git branch foo                                 <2>\n+$ git tag foo                                    <3>\n ------------\n \n <1> creates a new branch `foo`, which refers to commit `f`, and then\n\nbase-commit: a38d39a4c50d1275833aba54c4dbdfce9e2e9ca1\n-- \ngitgitgadget\n"},{"id":"469964","messageId":"018501d9241b$fe4b1270$fae13750$@nexbridge.com","threadId":"59049","inReplyTo":"xmqqbkn8wcqo.fsf@gitster.g","subject":"RE: [PATCH] doc: use \"git switch -c\" rather than \"git checkout -b\" consistently","fromName":"","fromEmail":"rsbecker@nexbridge.com","sentAt":"2023-01-09T11:17:37Z","receivedAt":"2023-01-09T11:19:05Z","isPatch":true,"sender":{"key":"randall.becker@nexbridge.ca","avatar":"https://avatars.githubusercontent.com/u/28956764?v=4"},"body":"On January 8, 2023 11:31 PM, Junio C Hamano wrote:\n>\"Yutaro Ohno via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n>\n>> From: Yutaro Ohno <yutaro.ono.418@gmail.com>\n>> Subject: Re: [PATCH] doc: use \"git switch -c\" rather than \"git\n>> checkout -b\" consistently\n>\n>Hmph.  When two things work equally well, is it a good idea to describe\nonly one\n>\"consistently\", or mention both that can be used pretty much\ninterchangeably in\n>different places?  I am not 100% sure \"consistently\" is a good thing here.\n>\n>Thoughts from others?\n\ngit switch is still marked as EXPERIMENTAL in the online help. I don't think\nmoving broadly to switch from checkout in the documentation should happen\nuntil the EXPERIMENTAL designation is dropped. After that, then \"switch -c\"\nshould be used everywhere instead of checkout (except for in the checkout\ndocumentation).\n\n--Randall\n\n"},{"id":"470000","messageId":"CAPig+cQ1PMYhWiwRiq2eOWzHYmqcCC6QfkHCuVTxaeA7fz0ddw@mail.gmail.com","threadId":"59049","inReplyTo":"018501d9241b$fe4b1270$fae13750$@nexbridge.com","subject":"Re: [PATCH] doc: use \"git switch -c\" rather than \"git checkout -b\" consistently","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2023-01-09T19:16:46Z","receivedAt":"2023-01-09T19:17:41Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Mon, Jan 9, 2023 at 6:20 AM <rsbecker@nexbridge.com> wrote:\n> On January 8, 2023 11:31 PM, Junio C Hamano wrote:\n> >\"Yutaro Ohno via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n> >> Subject: Re: [PATCH] doc: use \"git switch -c\" rather than \"git\n> >> checkout -b\" consistently\n> >\n> >Hmph.  When two things work equally well, is it a good idea to describe\n> only one\n> >\"consistently\", or mention both that can be used pretty much\n> interchangeably in\n> >different places?  I am not 100% sure \"consistently\" is a good thing here.\n> >\n> >Thoughts from others?\n>\n> git switch is still marked as EXPERIMENTAL in the online help. I don't think\n> moving broadly to switch from checkout in the documentation should happen\n> until the EXPERIMENTAL designation is dropped. After that, then \"switch -c\"\n> should be used everywhere instead of checkout (except for in the checkout\n> documentation).\n\nSuch a point probably should have been raised when 328c6cb853 (doc:\npromote \"git switch\", 2019-03-29) was submitted, but since 328c6cb853\nwas merged nearly four years ago and has been pointing people at\ngit-switch all this time, it's probably too late to use it as an\nargument now.\n"},{"id":"470004","messageId":"CAPig+cTHMEeUw8PVg7nWU8+jdo=yN9nC+RRuaSiVg8D3Or-nNQ@mail.gmail.com","threadId":"59049","inReplyTo":"pull.1422.v2.git.git.1673261237449.gitgitgadget@gmail.com","subject":"Re: [PATCH v2] doc: add \"git switch -c\" as another option on detached HEAD","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2023-01-09T19:53:13Z","receivedAt":"2023-01-09T19:53:51Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Mon, Jan 9, 2023 at 5:53 AM Yutaro Ohno via GitGitGadget\n<gitgitgadget@gmail.com> wrote:\n> In the \"DETACHED HEAD\" section in the git-checkout doc, it suggests\n> using \"git checkout -b <branch-name>\" to create a new branch on the\n> detached head.\n>\n> On the other hand, when you checkout a commit that is not at the tip of\n> any named branch (e.g., when you checkout a tag), git suggests using\n> \"git switch -c <branch-name>\".\n>\n> Add \"git switch -c\" as another option and mitigate this inconsistency.\n>\n> Signed-off-by: Yutaro Ohno <yutaro.ono.418@gmail.com>\n> ---\n> diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt\n> @@ -477,9 +477,9 @@ before that happens. If we have not yet moved away from commit `f`,\n>  ------------\n> -$ git checkout -b foo   <1>\n> -$ git branch foo        <2>\n> -$ git tag foo           <3>\n> +$ git checkout -b foo  # or \"git switch -c foo\"  <1>\n> +$ git branch foo                                 <2>\n> +$ git tag foo                                    <3>\n>  ------------\n\nThanks. This version looks good to me and addresses reviewer comments[1,2,3].\n\n[1]: https://lore.kernel.org/git/CAPig+cQe_VMW2KV+ZyZwosFw07Q+hePryDVushRJ-jFfD4yzpw@mail.gmail.com/\n[2]: https://lore.kernel.org/git/xmqqk01wusmz.fsf@gitster.g/\n[3]: https://lore.kernel.org/git/CAPig+cTO1jBjcwjX4UpxG813OwrDAaYVvViC_XGWorwbXvOfvw@mail.gmail.com/\n"},{"id":"470006","messageId":"01ad01d92464$b62492c0$226db840$@nexbridge.com","threadId":"59049","inReplyTo":"CAPig+cQ1PMYhWiwRiq2eOWzHYmqcCC6QfkHCuVTxaeA7fz0ddw@mail.gmail.com","subject":"RE: [PATCH] doc: use \"git switch -c\" rather than \"git checkout -b\" consistently","fromName":"","fromEmail":"rsbecker@nexbridge.com","sentAt":"2023-01-09T19:58:14Z","receivedAt":"2023-01-09T19:58:55Z","isPatch":true,"sender":{"key":"randall.becker@nexbridge.ca","avatar":"https://avatars.githubusercontent.com/u/28956764?v=4"},"body":"On January 9, 2023 2:17 PM, Eric Sunshine wrote:\n>On Mon, Jan 9, 2023 at 6:20 AM <rsbecker@nexbridge.com> wrote:\n>> On January 8, 2023 11:31 PM, Junio C Hamano wrote:\n>> >\"Yutaro Ohno via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n>> >> Subject: Re: [PATCH] doc: use \"git switch -c\" rather than \"git\n>> >> checkout -b\" consistently\n>> >\n>> >Hmph.  When two things work equally well, is it a good idea to\n>> >describe\n>> only one\n>> >\"consistently\", or mention both that can be used pretty much\n>> interchangeably in\n>> >different places?  I am not 100% sure \"consistently\" is a good thing here.\n>> >\n>> >Thoughts from others?\n>>\n>> git switch is still marked as EXPERIMENTAL in the online help. I don't\n>> think moving broadly to switch from checkout in the documentation\n>> should happen until the EXPERIMENTAL designation is dropped. After that, then\n>\"switch -c\"\n>> should be used everywhere instead of checkout (except for in the\n>> checkout documentation).\n>\n>Such a point probably should have been raised when 328c6cb853 (doc:\n>promote \"git switch\", 2019-03-29) was submitted, but since 328c6cb853 was\n>merged nearly four years ago and has been pointing people at git-switch all this\n>time, it's probably too late to use it as an argument now.\n\nI agree. Perhaps it is time to drop the \"EXPERIMENTAL\" notices from 'git switch', in that case.\n\n"},{"id":"470011","messageId":"CAPig+cTJ7CQpeo6v6j0L1beoTKyKnXcii2vYqRwy40R01vCo+A@mail.gmail.com","threadId":"59049","inReplyTo":"01ad01d92464$b62492c0$226db840$@nexbridge.com","subject":"Re: [PATCH] doc: use \"git switch -c\" rather than \"git checkout -b\" consistently","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2023-01-09T21:08:00Z","receivedAt":"2023-01-09T21:13:05Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Mon, Jan 9, 2023 at 2:58 PM <rsbecker@nexbridge.com> wrote:\n> On January 9, 2023 2:17 PM, Eric Sunshine wrote:\n> >On Mon, Jan 9, 2023 at 6:20 AM <rsbecker@nexbridge.com> wrote:\n> >> git switch is still marked as EXPERIMENTAL in the online help. I don't\n> >> think moving broadly to switch from checkout in the documentation\n> >> should happen until the EXPERIMENTAL designation is dropped. After that, then\n> >\"switch -c\"\n> >> should be used everywhere instead of checkout (except for in the\n> >> checkout documentation).\n> >\n> >Such a point probably should have been raised when 328c6cb853 (doc:\n> >promote \"git switch\", 2019-03-29) was submitted, but since 328c6cb853 was\n> >merged nearly four years ago and has been pointing people at git-switch all this\n> >time, it's probably too late to use it as an argument now.\n>\n> I agree. Perhaps it is time to drop the \"EXPERIMENTAL\" notices from 'git switch', in that case.\n\nPerhaps. Perhaps not. As I recall, both Felipe and Ævar expressed\nrather serious concerns that git-switch is not yet ready as a proper\ngit-checkout replacement. Samples of their concerns can be found at\n[1] and [2], for instance.\n\nBy the way, git-worktree is even older and probably more widely used\nthan git-switch, yet it is still marked \"experimental\", as well, and\nperhaps rightly so. As far as I understand, for instance, it still\nisn't compatible with submodules (though there may have been some\nrecent work from one of the Googlers in that area?).\n\n[1]: https://lore.kernel.org/git/211021.86wnm6l1ip.gmgdl@evledraar.gmail.com/\n[2]: https://lore.kernel.org/git/CAPiPmQnb=XMaF2+YkryEbiX8zA=jwa5y=fbAGk9jpCExpbS4Rw@mail.gmail.com/T/\n"},{"id":"470012","messageId":"230109.861qo31jr1.gmgdl@evledraar.gmail.com","threadId":"59049","inReplyTo":"CAPig+cTJ7CQpeo6v6j0L1beoTKyKnXcii2vYqRwy40R01vCo+A@mail.gmail.com","subject":"Re: [PATCH] doc: use \"git switch -c\" rather than \"git checkout -b\" consistently","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2023-01-09T21:24:53Z","receivedAt":"2023-01-09T21:27:36Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Mon, Jan 09 2023, Eric Sunshine wrote:\n\n> On Mon, Jan 9, 2023 at 2:58 PM <rsbecker@nexbridge.com> wrote:\n>> On January 9, 2023 2:17 PM, Eric Sunshine wrote:\n>> >On Mon, Jan 9, 2023 at 6:20 AM <rsbecker@nexbridge.com> wrote:\n>> >> git switch is still marked as EXPERIMENTAL in the online help. I don't\n>> >> think moving broadly to switch from checkout in the documentation\n>> >> should happen until the EXPERIMENTAL designation is dropped. After that, then\n>> >\"switch -c\"\n>> >> should be used everywhere instead of checkout (except for in the\n>> >> checkout documentation).\n>> >\n>> >Such a point probably should have been raised when 328c6cb853 (doc:\n>> >promote \"git switch\", 2019-03-29) was submitted, but since 328c6cb853 was\n>> >merged nearly four years ago and has been pointing people at git-switch all this\n>> >time, it's probably too late to use it as an argument now.\n>>\n>> I agree. Perhaps it is time to drop the \"EXPERIMENTAL\" notices from 'git switch', in that case.\n>\n> Perhaps. Perhaps not. As I recall, both Felipe and Ævar expressed\n> rather serious concerns that git-switch is not yet ready as a proper\n> git-checkout replacement. Samples of their concerns can be found at\n> [1] and [2], for instance.\n>\n> By the way, git-worktree is even older and probably more widely used\n> than git-switch, yet it is still marked \"experimental\", as well, and\n> perhaps rightly so. As far as I understand, for instance, it still\n> isn't compatible with submodules (though there may have been some\n> recent work from one of the Googlers in that area?).\n>\n> [1]: https://lore.kernel.org/git/211021.86wnm6l1ip.gmgdl@evledraar.gmail.com/\n> [2]: https://lore.kernel.org/git/CAPiPmQnb=XMaF2+YkryEbiX8zA=jwa5y=fbAGk9jpCExpbS4Rw@mail.gmail.com/T/\n\nI think deciding on the \"EXPERIMENTAL\" would be nice, and it should\narguably precede wider use of \"git switch\" in the docs.\n\nBut on the other hand we already provide examples of it outside its own\ndocs, so perhaps a change such as the one being proposed here is\nsomething we should just accept.\n\nDiscussions such as these might also suggest that thinking we can change\nits fundamental behavior at this point are wishful thinking, i.e. maybe\ntoo many users rely on it, and didn't read the disclaimer.\n"},{"id":"470295","messageId":"xmqqfsce48r8.fsf@gitster.g","threadId":"59049","inReplyTo":"CAPig+cTHMEeUw8PVg7nWU8+jdo=yN9nC+RRuaSiVg8D3Or-nNQ@mail.gmail.com","subject":"Re: [PATCH v2] doc: add \"git switch -c\" as another option on detached HEAD","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2023-01-13T17:58:03Z","receivedAt":"2023-01-13T18:04:16Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Sunshine <sunshine@sunshineco.com> writes:\n\n> Thanks. This version looks good to me and addresses reviewer comments[1,2,3].\n\nThanks, both.  Let's queue and merge it to 'next'.\n"}]}