Thread (10 messages) flat view 10 messages, 6 authors, 2016-06-15

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

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:43:51

Possibly related (same subject, not in this thread)

Hi,

On Wed, 14 Nov 2007, Bill Lear wrote:
On Wednesday, November 14, 2007 at 11:32:32 (-0800) Junio C Hamano writes:
quoted
But cloning void to start the same project by multiple people and 
pushing their initial commits as roots to start a project indicates the 
lack of developer communication (besides, it just feels like a bad 
style, a hangover from centralized SCM mentality, but that is fine). 
...
We have several users who have been using git for the past 9 months and 
they each find this unreasonably complicated.  [...]

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
I have a better idea:

[the initial import, on another machine:]
% mkdir new_repo
% cd new_repo
% git init
[add content]
% git commit -a -m "Initial stuff"
% git remote add origin git://host/repo
% git push origin master

If you do not want to be bothered with setting up the default 
"remote" and "merge" config variables manually, it is reasonable to ask 
for support to do that in "git remote".

If you really think that this workflow has anything to do with cloning an 
empty repository, I cannot help you.  I mean, you did not need to clone 
the big, empty void to do the initial commit, or did you?

(I actually think that it is another example of cvs/svn damage, where you 
_need_ to clone first, or otherwise you will _never_ be able to commit 
to the repository.)

BTW I am somewhat disgusted by your usage of git:// for pushing.

Ciao,
Dscho
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help