Re: Why is git clone not checking out files?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linus Torvalds
Date: Tuesday, January 30, 2007 - 12:04 pm

On Tue, 30 Jan 2007, Jakub Narebski wrote:

Well, HEAD pointing to a non-existent branch is actually a perfectly valid 
thing. It literally means "I haven't done the first commit yet".

So Bill's repository is a perfectly fine repository. It has a topic branch 
(called 'topic'), and it has an empty 'master' branch that just hasn't 
seen any commits yet. You can work on it as a full and normal git 
repository, because it really *is* a full and normal git repository.

Of course, I do agree that it'sa fairly confusing way to set up a repo, 
and you generally shouldn't do it, but Bill did it that way explicitly. 
Maybe he didn't do it "on purpose", but git at no point in time had any 
way to know that Bill wanted somethign else. Nothing he did was "wrong", 
and it's quite possible that it's what he could have meant to do.

Anyway, it's certainly easy to fix. Bill, you can either:

 - just rename the "topic" branch to "master"

 - change the HEAD to point to "topic" rather than "master".

(and if you do that setup in the future, the way to populate the initial 
bare repository would have been to just do

	git fetch original topic:master

and you'd never have seen this, because the branch you fetched would have 
been named the default 'master' in the first place).

		Linus
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Why is git clone not checking out files?, Jakub Narebski, (Tue Jan 30, 11:15 am)
Re: Why is git clone not checking out files?, Bill Lear, (Tue Jan 30, 11:18 am)
Re: Why is git clone not checking out files?, Shawn O. Pearce, (Tue Jan 30, 11:22 am)
Re: Why is git clone not checking out files?, Bill Lear, (Tue Jan 30, 11:29 am)
Re: Why is git clone not checking out files?, Linus Torvalds, (Tue Jan 30, 11:41 am)
Re: Why is git clone not checking out files?, Jakub Narebski, (Tue Jan 30, 11:49 am)
Re: Why is git clone not checking out files?, Bill Lear, (Tue Jan 30, 12:03 pm)
Re: Why is git clone not checking out files?, Linus Torvalds, (Tue Jan 30, 12:04 pm)
Re: Why is git clone not checking out files?, Shawn O. Pearce, (Tue Jan 30, 12:09 pm)
Re: Why is git clone not checking out files?, Bill Lear, (Tue Jan 30, 12:11 pm)
Re: Why is git clone not checking out files?, Johannes Schindelin, (Tue Jan 30, 12:15 pm)
Re: Why is git clone not checking out files?, Jakub Narebski, (Tue Jan 30, 12:17 pm)
Re: Why is git clone not checking out files?, Jakub Narebski, (Tue Jan 30, 12:18 pm)
Re: Why is git clone not checking out files?, Bill Lear, (Tue Jan 30, 12:27 pm)
Re: Why is git clone not checking out files?, Linus Torvalds, (Tue Jan 30, 12:33 pm)
Re: Why is git clone not checking out files?, Bill Lear, (Tue Jan 30, 12:36 pm)
Re: Why is git clone not checking out files?, Bill Lear, (Tue Jan 30, 12:43 pm)
Re: Why is git clone not checking out files?, Bill Lear, (Tue Jan 30, 12:54 pm)
Re: Why is git clone not checking out files?, Linus Torvalds, (Tue Jan 30, 1:00 pm)
Re: Why is git clone not checking out files?, Bill Lear, (Tue Jan 30, 1:38 pm)
Re: Why is git clone not checking out files?, Jakub Narebski, (Wed Jan 31, 2:56 am)