Subject: Re: git-show --stat on first commit

From: Shawn Pearce <[email-masked]>
Date: Tue, 21 Nov 2006 13:34:45 -0500

Petr Baudis <[email-masked]> wrote:
> BTW, the other frequent reason why empty commits come up so frequently
> is a FAQ "how do I create an unrelated branch in my repository" - their
> idea is that they will create a new branch starting with an empty commit
> (of course noone would think of anything like that in inferior VCSes
> because replacing the checked out trees would took forever; how cool Git
> is!).
> 
> (The answer is usually "create the branch in a separate repo and then
> fetch it to the original one". But it feels a bit kludgy given the
> otherwise seamless support for unrelated branches. (Not that I ever was
> a big fan of unrelated long-lived branches in general.))

Or just abuse git-symbolic-ref:

	rm .git/index
	git symbolic-ref HEAD refs/heads/unrelated-branch
	git add ...
	git commit ...

see, so simple.  And no need to create an unrelated repository and
pull across to this one...

--