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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> If your publishing repo is local like the above, then

In my case, it's more often a "backed-up and slow NFS disk" Vs "local
disk" than a matter of publishing, but the result is similar.

>  $ mkdir /tmp/junk && cd /tmp/junk
>  $ git init; tar xf /tmp/project.tar; git add .; ... populate ... 
>  $ git commit -m initial
>  $ cd /else/where/to/publish
>  $ git clone --bare /tmp/junk myproject.git
>  $ rm -fr /tmp/junk
>
> would be enough to get your published repository started, isn't
> it?  Then wouldn't:
>
>  $ cd $HOME
>  $ git clone /else/where/to/publish/myproject.git myproject
>
> set up your ~/myproject exactly the same way as other people who
> will work with that published repository?

Sure, it definitely works. But that (creating a temporary repository,
and right after, delete it) also is an extra step. Not a huge one, but
still an extra step.

Take the same with bzr for example:

$ bzr init ~/repo
$ bzr checkout ~/repo ~/local/work/
$ cd ~/local/work/
<put files, bzr add, bzr commit>
<continue working in ~/local/work/, commit, whatever>

(bzr checkout is a bit different from git clone, but the difference it
not totally relevant here).

I litterally have just two bzr commands before I can start working
normally.

-- 
Matthieu
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux