# symlinks

3 messages from 2006-05-07 to 2006-05-07. Participants: Yakov Lerner, Linus Torvalds.
Thread: https://gitlist.dev/t/4091

## Yakov Lerner, 2006-05-07 17:47

Subject: symlinks
Message-ID: <f36b08ee0605071047h32ccef4bk76ac360ada1331a@mail.gmail.com>
URL: https://gitlist.dev/e/f36b08ee0605071047h32ccef4bk76ac360ada1331a%40mail.gmail.com

```
Hello,

I have a project that makes heavy use of symlinks in the source tree.
I added it to git, then cloned the repository, and all symlinks were
converted to plain files. What am I missing to preserve symlinks ?

Yakov

```

## Linus Torvalds, 2006-05-07 18:07

Subject: Re: symlinks
Message-ID: <Pine.LNX.4.64.0605071104230.3718@g5.osdl.org>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0605071104230.3718%40g5.osdl.org
In-Reply-To: <f36b08ee0605071047h32ccef4bk76ac360ada1331a@mail.gmail.com>

```


On Sun, 7 May 2006, Yakov Lerner wrote:
> 
> I have a project that makes heavy use of symlinks in the source tree.
> I added it to git, then cloned the repository, and all symlinks were
> converted to plain files. What am I missing to preserve symlinks ?

You're not missing anything, it sounds like a bug. What did you use to 
clone, and what version? It definitely doesn't happen for me:

	mkdir symlink
	cd symlink/
	git-init-db 
	ln -s unknown new-link
	ls -l
	git add new-link 
	git commit

	cd 
	git clone symlink symlink2
	cd symlink2/
	ls -l

shows that the symlink was preserved.

But maybe there's a bug in some older version, or in some other clone 
protocol...

		Linus

```

## Yakov Lerner, 2006-05-07 19:28

Subject: Re: symlinks
Message-ID: <f36b08ee0605071228s40832980k3fd045e8fa0ba84@mail.gmail.com>
URL: https://gitlist.dev/e/f36b08ee0605071228s40832980k3fd045e8fa0ba84%40mail.gmail.com
In-Reply-To: <Pine.LNX.4.64.0605071104230.3718@g5.osdl.org>

```
On 5/7/06, Linus Torvalds <torvalds@osdl.org> wrote:
>
>
> On Sun, 7 May 2006, Yakov Lerner wrote:
> >
> > I have a project that makes heavy use of symlinks in the source tree.
> > I added it to git, then cloned the repository, and all symlinks were
> > converted to plain files. What am I missing to preserve symlinks ?
>
> You're not missing anything, it sounds like a bug. What did you use to
> clone, and what version? It definitely doesn't happen for me:
>
>        mkdir symlink
>        cd symlink/
>        git-init-db
>        ln -s unknown new-link
>        ls -l
>        git add new-link
>        git commit
>
>        cd
>        git clone symlink symlink2
>        cd symlink2/
>        ls -l
>
> shows that the symlink was preserved.

Yes, I see now it's not git problem. I suspect
I just incorrectly copied the files into git-init-db directory,
something like 'cp -r' instead of 'cp -a' or tar/cpio. Sorry I'm
new to git.

Thanks
Yakov

```
