Re: Newbie grief

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

 



On Wed, 02 May 2012 16:21:07 +0200, Hallvard Breien Furuseth wrote:

> And in a bare repository:
>
>     git init --bare foo.git
>     cd              foo.git
>     git remote add bar ../bar.git
>     git fetch      bar
>         --> adds bar/master etc.
>
> For some reason, 'git clone --bare' does not treat the cloned
> repository the same way - it just copies it under refs/heads/
> instead of refs/remotes/, without even adding it as a remote.

What do you mean?

  $ git init bar.git; cd bar.git
  $ echo a > a; git add a; git commit -m a; cd ..
  $ git clone        bar.git baz.git
  $ git clone --bare baz.git foo.git; cd foo.git
  $ git remote add bar ../bar.git
  $ git fetch bar
  $ git branch -a
  * master
    remotes/bar/master

Also, removing the `baz' intermediate repository doesn't matter:

  $ git init bar.git; cd bar.git
  $ echo a > a; git add a; git commit -m a; cd ..
  $ git clone --bare bar.git foo.git; cd foo.git
  $ git remote add bar ../bar.git
  $ git fetch bar
  $ git branch -a
  * master
    remotes/bar/master

For completenes, your example again:

  $ git init bar.git; cd bar.git
  $ echo a > a; git add a; git commit -m a; cd ..
  $ git init --bare foo.git
  $ cd              foo.git
  $ git remote add bar ../bar.git
  $ git fetch      bar
  $ git branch -a
    remotes/bar/master
--
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]