From: Linus Torvalds Subject: Re: Bootstrapping into git, commit gripes at me Date: Mon, 11 Jul 2005 21:34:33 -0700 (PDT) Message-ID: References: <20050708230750.GA23847@buici.com> <20050711222046.GA21376@buici.com> <7vll4dndwu.fsf@assigned-by-dhcp.cox.net> <20050712021004.GA27576@buici.com> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: Junio C Hamano , Git Mailing List X-From: git-owner@vger.kernel.org Tue Jul 12 06:37:32 2005 Return-path: Received: from vger.kernel.org ([12.107.209.244]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DsCWP-0007qA-Ou for gcvg-git@gmane.org; Tue, 12 Jul 2005 06:37:30 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262350AbVGLEgr (ORCPT ); Tue, 12 Jul 2005 00:36:47 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262362AbVGLEgp (ORCPT ); Tue, 12 Jul 2005 00:36:45 -0400 Received: from smtp.osdl.org ([65.172.181.4]:60828 "EHLO smtp.osdl.org") by vger.kernel.org with ESMTP id S262350AbVGLEel (ORCPT ); Tue, 12 Jul 2005 00:34:41 -0400 Received: from shell0.pdx.osdl.net (fw.osdl.org [65.172.181.6]) by smtp.osdl.org (8.12.8/8.12.8) with ESMTP id j6C4YYjA021694 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 11 Jul 2005 21:34:34 -0700 Received: from localhost (shell0.pdx.osdl.net [10.9.0.31]) by shell0.pdx.osdl.net (8.13.1/8.11.6) with ESMTP id j6C4YXa3021715; Mon, 11 Jul 2005 21:34:33 -0700 To: Marc Singer In-Reply-To: X-Spam-Status: No, hits=0 required=5 tests= X-Spam-Checker-Version: SpamAssassin 2.63-osdl_revision__1.40__ X-MIMEDefang-Filter: osdl$Revision: 1.113 $ X-Scanned-By: MIMEDefang 2.36 Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org On Mon, 11 Jul 2005, Linus Torvalds wrote: > > Of course, if you want to create a new branch "my-branch" and _not_ > check it out, you could have done so with just > > git-rev-parse v2.6.12^0 > .git/refs/heads/my-branch > > which I think I will codify as "git branch". And now we have that "git branch". It's a trivial one-liner, except with the setup and error checking it's actually more like six lines. Linus --- commit 37f1a519f2ea0ce912ccd7c623aea992147c3900 Author: Linus Torvalds Date: Mon Jul 11 21:30:23 2005 -0700 Add "git branch" script You can use it as git branch [start-point] and it creates a new branch of name . If a starting point is specified, that will be where the branch is created, otherwise it will be created at the current HEAD. The sequence git branch xyz abc git checkout xyz can also be written as git checkout -b xyz abc as per the previous commit.