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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Bill Lear
Date: Wednesday, November 14, 2007 - 1:16 pm

On Wednesday, November 14, 2007 at 11:32:32 (-0800) Junio C Hamano writes:

We have several users who have been using git for the past 9 months
and they each find this unreasonably complicated.  We realize it is
work, perhaps not of the highest importance, but it's also easy for
more experienced users to simply pooh-pooh the ideas that newer users
have as "silly" because instead of the two steps they would like, they
can "just" do the five "easy" steps.

Well, here's what we'd like:

% mkdir new_repo
% cd new_repo
% git --bare init

[on another machine:]
% git clone git://host/new_repo
% cd new_repo
% git init
[add content]
% git commit -a -m "Initial stuff"
% git push

So, this is hard work, and other priorities intrude.  Ok.

Instead, we have to 1) figure out how to do this right, because it's
difficult to remember and not intuitive, and 2) once we have "figured
it out", really figure it out, because there are a few gotchas:

% mkdir new_repo
% cd new_repo
% git --bare init

% mkdir new_repo
% cd new_repo
[add content]
% git commit -a -m "Initial stuff"
% git config remote.origin.url git://host/new_repo
% git push
[ach! fails!  what's up??]
[poke, read, poke some more, try other things..]
[try setting the remote.origin.fetch?  No, that doesn't work]
[try setting branch.master.remote?  Just edit by hand??]
% git push master
[fails again; read some more; think, think, think...]
% git push origin master
[aha! finally it works]

But now, I have a repo in which I cannot just say "git push" to update
my remote repo.

So, if we can't have clone "do the right thing", then it would be nice
if we had something to allow us to do this, perhaps an argument to git
init:

% mkdir new_repo
% cd new_repo
% git --bare init

[on another machine:]
% mkdir new_repo
% cd new_repo
% git init --mirror git://host/new_repo
[add content]
% git commit -a -m "Initial stuff"
% git push

Where 'git init --mirror <blah>' just sets up the config file
properly.

Something to think about ...


Bill
-
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 ..., Johannes Schindelin, (Tue Nov 13, 4:56 pm)
Re: Cloning empty repositories, was Re: What is the idea f ..., Bill Lear, (Wed Nov 14, 1:16 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)