Re: Bug: "git checkout -b" should be allowed in empty repo
- From
Johannes Sixt <j.sixt@viscovery.net>
- Date
- Jan 31, 2012, 10:01 UTC
- Message-ID
- <4F27BBED.9080902@viscovery.net>
- In-Reply-To
- <4F27ACED.2050709@alum.mit.edu>
Am 1/31/2012 9:57, schrieb Michael Haggerty:
> No, the idea is to avoid special casing by making 0{40} into a real (but
> empty) revision.But then why not just have git init perform the equivalent of
c=$(echo "Start" | git commit-tree $empty_tree_sha1) && git update-ref refs/heads/master $c
People who dislike an empty initial commit can always use "git commit --amend" for the first "real" commit.
-- Hannes