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: Junio C Hamano <gitster@...>
Cc: Johannes Schindelin <Johannes.Schindelin@...>, Bill Lear <rael@...>, Jan Wielemaker <wielemak@...>, <git@...>
Date: Tuesday, November 13, 2007 - 6:01 pm

Junio C Hamano <gitster@pobox.com> writes:


Yes, we agree on that point.

But I do find (incorrect with current git)

(1)

$ mkdir ~/bare-repo
$ cd ~/bare-repo
$ git --bare init
$ cd
$ git clone bare-repo local/non-bare
$ cd local/non-bare
<put files, git add, git commit>
$ git push

Simpler than (valid with current git)

(2)

$ mkdir ~/bare-repo
$ cd ~/bare-repo
$ git --bare init
$ cd
$ mkdir local/non-bare
$ cd local/non-bare
$ git init
<put files, git add, git commit>
$ git push ~/bare-repo
$ git remote add origin ~/bare-repo
$ git config branch.master.remote origin
$ git config branch.master.merge refs/heads/master

Where the bare-ness of ~/bare-repo matters is that with a bare
repository, I could have actually created the initial commit there
(valid with current git too):

(3)

$ mkdir ~/non-bare-repo
$ cd ~/non-bare-repo
$ git init
<put files, git add, git commit>
$ cd
$ git clone bare-repo local/non-bare


Either there is a way to achive (3) above with a bare repository which
I don't know, or bare-ness does matter in this case.

-- 
Matthieu
-
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..., Matthieu Moy, (Tue Nov 13, 6:01 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..., 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