From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 28D6F1F8C6 for ; Fri, 9 Jul 2021 13:25:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231886AbhGIN1M (ORCPT ); Fri, 9 Jul 2021 09:27:12 -0400 Received: from smtprelay07.ispgateway.de ([134.119.228.104]:19531 "EHLO smtprelay07.ispgateway.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231856AbhGIN1L (ORCPT ); Fri, 9 Jul 2021 09:27:11 -0400 Received: from [84.163.73.96] (helo=[192.168.2.202]) by smtprelay07.ispgateway.de with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1m1qTQ-0005T6-RJ; Fri, 09 Jul 2021 15:23:20 +0200 Subject: Re: What actually is a branch? To: Felipe Contreras , Sergey Organov Cc: Junio C Hamano , git@vger.kernel.org References: <7870a0ad-8fa1-9dbd-1978-1f44ec6970c5@mfriebe.de> <87wnqaclz8.fsf@osv.gnss.ru> <60e5f3981de5f_301437208bc@natae.notmuch> <87bl7d3l8r.fsf@osv.gnss.ru> <60e61bbd7a37d_3030aa2081a@natae.notmuch> <877di13hhe.fsf@osv.gnss.ru> <60e67389a4adc_306ac1208fd@natae.notmuch> <4057b3ac-a77c-0d5f-d3f4-ad781754aae4@mfriebe.de> <60e736e72da68_30939020850@natae.notmuch> <155308af-42ad-b044-fb37-676251a9b7e1@mfriebe.de> <60e762243aab1_30a7b02089@natae.notmuch> <2b85a7eb-d0be-65e7-ecbb-1750abf53e53@mfriebe.de> <60e79c31aaa72_30b8a4208c1@natae.notmuch> From: Martin Message-ID: <084a355e-95cd-5c84-2fa5-a901da3e0e49@mfriebe.de> Date: Fri, 9 Jul 2021 15:24:23 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <60e79c31aaa72_30b8a4208c1@natae.notmuch> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Df-Sender: bWVAbWZyaWViZS5kZQ== Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On 09/07/2021 02:45, Felipe Contreras wrote: > I believe we have all the semantic tools needed to write something that > is understandable by most people regardless of their conception of what a > branch is. While writing a mail on the origin topic (improve docs), I noticed that the word "branch-ish" is still free. Which would be anything that resolves to a "branch reference". Currently this only is - branch name. - branchname@{upstream} Btw, if branch-foo is tracking a local branch then git checkout branch-foo@{upstream} will switch the the tracked local branch. * "branch-ish" could be defined as: Anything that can be resolved to a branch-name. A branch-name is a reference to the boundary that marks the end of a branch. A branch-ish can be given where a commit-ish is expected. In that case it can be resolved to the last commit in the branch. There may be further need to distinguish between local and remote. For example git checkout [] > When the argument is a branch name, the --detach option can be used to detach HEAD at the tip of the branch (git checkout would check out that branch without detaching HEAD). Does not mention that it will also detach, if is the a remote branch name git checkout origin/master