From: Johannes Sixt Date: Tue, 11 Mar 2008 13:08:10 GMT Subject: Re: commit 0? (or: create new empty branch) Message-ID: <47D6843A.1030200@viscovery.net> In-Reply-To: <20080311123004.GA27577@bit.office.eurotux.com> Luciano Rocha schrieb: > I'd like to create a new branch, without any pre-existing data, for > purposes similar to git's html/man/..... > > However, I've been unable to do that using the higher level tools. > > Even starting from an empty git rep, I can't create a branch: > > $ git init > Initialized empty Git repository in .git/ > $ git branch empty > fatal: Not a valid object name: 'master'. > > How were the different git.git branches created? There are two ways: 1. Plumbing level $ git symbolic-ref HEAD refs/heads/html $ rm .git/index ...commit new content... 2. Porcelain level $ mkdir ../html && cd ../html $ git init ...commit new content... $ cd - # go back $ git fetch ../html master:html -- Hannes