Thread (13 messages) flat view 13 messages, 4 authors, 2016-08-11

Re: Bootstrapping into git, commit gripes at me

From: Linus Torvalds <torvalds@osdl.org>
Date: 2016-06-15 22:42:02


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 [off-list ref]
Date:   Mon Jul 11 21:30:23 2005 -0700

    Add "git branch" script

    You can use it as

        git branch <branchname> [start-point]

    and it creates a new branch of name <branchname>.  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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help