From: Junio C Hamano Date: Mon, 13 Dec 2021 21:36:40 GMT Subject: Re: [PATCH 2/2] checkout: introduce "--to-branch" option Message-ID: In-Reply-To: <211213.86r1ag6ztx.gmgdl@evledraar.gmail.com> Ævar Arnfjörð Bjarmason writes: > I don't see how it's fundimentally different than the DWIM logic of > taking "" and seeing that there's only one "refs/heads/", > and giving up in other cases where we get ambiguous reference names that > we can't resolve. In that example, once you obtained a local branch whose name is , it is obvious how you would work with that. Your next "git checkout " would work on the local one, and only the initial one does something magical. Which makes quite a lot of sense. There is no similarity in it with "--to-branch " that is being discussed here.