login
Header Space

 
 

Re: Cloning empty repositories, was Re: What is the idea for bare repositories?

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Matthieu Moy <Matthieu.Moy@...>
Cc: Shawn O. Pearce <spearce@...>, Junio C Hamano <gitster@...>, Johannes Schindelin <Johannes.Schindelin@...>, Bill Lear <rael@...>, Jan Wielemaker <wielemak@...>, <git@...>
Date: Tuesday, November 13, 2007 - 3:50 pm

On Nov 13, 2007, at 5:50 AM, Matthieu Moy wrote:


But how is clone expected to do that when the origin is an empty  
repo?  There is no branch for it to track, and automagically setting  
it to master is bogus because then it's tracking something that  
doesn't exist.

The easy way to set up the last bit is "git checkout -b master --track  
origin/master".  But that won't work if origin/master doesn't exist.   
The following will always work:

git config branch.master.remote origin
git config branch.master.merge refs/heads/master

But asking git-clone do do this sort of odd magic for an empty repo is  
dubious at best.  Perhaps convenient for your situation, but creates  
repos that don't actually work.  (Will give errors when trying to  
merge a non-existent branch, at the very least.)

~~ Brian
-
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:
What is the idea for bare repositories?, David Kastrup, (Mon Nov 12, 9:11 am)
Re: What is the idea for bare repositories?, Bruno Cesar Ribas, (Mon Nov 12, 9:19 am)
Re: What is the idea for bare repositories?, Johannes Schindelin, (Mon Nov 12, 9:57 am)
Re: What is the idea for bare repositories?, Jan Wielemaker, (Mon Nov 12, 12:19 pm)
Cloning empty repositories, was Re: What is the idea for bar..., Johannes Schindelin, (Mon Nov 12, 12:34 pm)
Re: Cloning empty repositories, was Re: What is the idea for..., Johannes Schindelin, (Mon Nov 12, 1:15 pm)
Re: Cloning empty repositories, was Re: What is the idea for..., Johannes Schindelin, (Mon Nov 12, 1:54 pm)
Re: Cloning empty repositories, was Re: What is the idea for..., Johannes Schindelin, (Mon Nov 12, 1:30 pm)
Re: Cloning empty repositories, was Re: What is the idea for..., Johannes Schindelin, (Mon Nov 12, 1:57 pm)
Re: Cloning empty repositories, was Re: What is the idea for..., Johannes Schindelin, (Mon Nov 12, 2:06 pm)
Re: Cloning empty repositories, was Re: What is the idea for..., Johannes Schindelin, (Thu Nov 15, 8:44 am)
Re: Cloning empty repositories, was Re: What is the idea for..., Johannes Schindelin, (Wed Nov 14, 4:58 pm)
Re: Cloning empty repositories, was Re: What is the idea for..., Johannes Schindelin, (Wed Nov 14, 8:28 pm)
Re: Cloning empty repositories, was Re: What is the idea for..., Johannes Schindelin, (Tue Nov 13, 7:19 am)
Re: Cloning empty repositories, was Re: What is the idea for..., Brian Gernhardt, (Tue Nov 13, 3:50 pm)
Re: Cloning empty repositories, was Re: What is the idea for..., Johannes Schindelin, (Tue Nov 13, 7:56 pm)
Re: Cloning empty repositories, was Re: What is the idea for..., Johannes Schindelin, (Mon Nov 12, 6:17 pm)
Re: What is the idea for bare repositories?, David Tweed, (Mon Nov 12, 10:20 am)
speck-geostationary