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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Matthieu Moy
Date: Tuesday, November 13, 2007 - 3: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, 6:11 am)
Re: What is the idea for bare repositories?, Bruno Cesar Ribas, (Mon Nov 12, 6:19 am)
Re: What is the idea for bare repositories?, Johannes Schindelin, (Mon Nov 12, 6:57 am)
Re: What is the idea for bare repositories?, David Tweed, (Mon Nov 12, 7:20 am)
Re: What is the idea for bare repositories?, Jan Wielemaker, (Mon Nov 12, 9:19 am)
Cloning empty repositories, was Re: What is the idea for b ..., Johannes Schindelin, (Mon Nov 12, 9:34 am)
Re: Cloning empty repositories, was Re: What is the idea f ..., Johannes Schindelin, (Mon Nov 12, 10:15 am)
Re: Cloning empty repositories, was Re: What is the idea f ..., Johannes Schindelin, (Mon Nov 12, 10:30 am)
Re: Cloning empty repositories, was Re: What is the idea f ..., Johannes Schindelin, (Mon Nov 12, 10:54 am)
Re: Cloning empty repositories, was Re: What is the idea f ..., Johannes Schindelin, (Mon Nov 12, 10:57 am)
Re: Cloning empty repositories, was Re: What is the idea f ..., Johannes Schindelin, (Mon Nov 12, 11:06 am)
Re: Cloning empty repositories, was Re: What is the idea f ..., Andreas Ericsson, (Mon Nov 12, 12:17 pm)
Re: Cloning empty repositories, was Re: What is the idea f ..., Johannes Schindelin, (Mon Nov 12, 3:17 pm)
Re: Cloning empty repositories, was Re: What is the idea f ..., Johannes Schindelin, (Tue Nov 13, 4:19 am)
Re: Cloning empty repositories, was Re: What is the idea f ..., Matthieu Moy, (Tue Nov 13, 3:01 pm)
Re: Cloning empty repositories, was Re: What is the idea f ..., Johannes Schindelin, (Tue Nov 13, 4:56 pm)
Re: Cloning empty repositories, was Re: What is the idea f ..., Johannes Schindelin, (Wed Nov 14, 1:58 pm)
Re: Cloning empty repositories, was Re: What is the idea f ..., Johannes Schindelin, (Wed Nov 14, 5:28 pm)
Re: Cloning empty repositories, was Re: What is the idea f ..., Johannes Schindelin, (Thu Nov 15, 5:44 am)