# git clone / git pull to USB memory stick (FAT) and symlinks

7 messages from 2010-11-11 to 2010-11-12. Participants: Gelonida, Junio C Hamano, Ferry Huberts, Santi Béjar.
Thread: https://gitlist.dev/t/25714

## Gelonida, 2010-11-11 16:35

Subject: git clone / git pull to USB memory stick (FAT) and symlinks
Message-ID: <ibh605$adm$1@dough.gmane.org>
URL: https://gitlist.dev/e/ibh605%24adm%241%40dough.gmane.org

```
Hi,

For a given project I'd like to have some USB memory sticks, which I'd
like to keep up to date.

I thought about cloning a remote git repository onto the stick
and performing
- regular pulls in order to update the USB stick
- occasional pushes in orderto publish changes performed on the stick.


Now my questions:


1.) Ignore skip / symlinks
-----------------------------
The git repository might contain symlinks (as it was created on a  linux
host)

Is there any way to perform a git clone / pull and just skip any symlink
in the working directory


2.) Avoiding file permission issues: Is this sufficient
---------------------------------------------------------

I read about some config setting which should avoid problems with
the rather limited file permissions on a FAT file system

git config --add core.fileMode false



3.) Any other special config settings
-----------------------------------------
Are there any other special preparations to be done fi I'd like to
have a non bare git repository on a memory stick.


Thanks for your suggestions

```

## Junio C Hamano, 2010-11-11 17:54

Subject: Re: git clone / git pull to USB memory stick (FAT) and symlinks
Message-ID: <7vk4kjhhjh.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vk4kjhhjh.fsf%40alter.siamese.dyndns.org
In-Reply-To: <ibh605$adm$1@dough.gmane.org>

```
Gelonida <gelonida@gmail.com> writes:

> I thought about cloning a remote git repository onto the stick
> and performing
> - regular pulls in order to update the USB stick
> - occasional pushes in orderto publish changes performed on the stick.

... missing is the reason why this is done to a USB memory stick.  More
specifically,...

> 1.) Ignore skip / symlinks
> 2.) Avoiding file permission issues: Is this sufficient

These become non-issues _if_ the reason you are putting this on an USB
stick is to safekeep and sneakernet the project data, and are not
interested in having a working tree on the stick, which I often find is
the use case after grilling people who ask about placing git repositories
on an USB stick.

And the commands to interact with such a repository without a working tree
are to "push" (into it), and "fetch" (from it).  IOW, you do not "pull"
into USB stick.

If you do need a working tree on the stick, and the stick has a FAT
derived filesystem (which would be the most common), then you would need

> git config --add core.fileMode false

and perhaps "core.symlinks false" also would help

```

## Gelonida, 2010-11-11 18:03

Subject: Re: git clone / git pull to USB memory stick (FAT) and symlinks
Message-ID: <ibhb64$51p$1@dough.gmane.org>
URL: https://gitlist.dev/e/ibhb64%2451p%241%40dough.gmane.org
In-Reply-To: <7vk4kjhhjh.fsf@alter.siamese.dyndns.org>

```
On 11/11/2010 06:54 PM, Junio C Hamano wrote:
> Gelonida <gelonida@gmail.com> writes:
> 
>> I thought about cloning a remote git repository onto the stick
>> and performing
>> - regular pulls in order to update the USB stick
>> - occasional pushes in orderto publish changes performed on the stick.
> 
> ... missing is the reason why this is done to a USB memory stick.  More
> specifically,...

The idea is to have a few administrator keys .


These administrator keys would be plugged into network less PCs. (no git
installed)


I wanted to use git to use these keys up to date.

As the write speed to USB keys is slow I thought about using git in
order to avoid copying wrting already up to date config scripts and tools.

Occasionally one might encounter errors in the setup scripts and fix
them immediatel with word pad on the targe system.

Thus the idea to change files directly on the USB key.

When repluging the key nto a development host one could pull / push in
order to update the central repositroy and all other users just ahd to
pull again to their keys.


I hope this explains why I thought about having
- a non bare repository on a USB stick
- due to historical reasons some sym links might be in the repository.
  thus my question of how to let git ignore these sym links.
   If this is not possible, then I would probably create a new
	symlink-less git repository


> 
>> 1.) Ignore skip / symlinks
>> 2.) Avoiding file permission issues: Is this sufficient
> 
> These become non-issues _if_ the reason you are putting this on an USB
> stick is to safekeep and sneakernet the project data, and are not
> interested in having a working tree on the stick, which I often find is
> the use case after grilling people who ask about placing git repositories
> on an USB stick.
> 
> And the commands to interact with such a repository without a working tree
> are to "push" (into it), and "fetch" (from it).  IOW, you do not "pull"
> into USB stick.
> 
> If you do need a working tree on the stick, and the stick has a FAT
> derived filesystem (which would be the most common), then you would need
> 
>> git config --add core.fileMode false
> 
> and perhaps "core.symlinks false" also would help

```

## Gelonida, 2010-11-11 18:09

Subject: Re: git clone / git pull to USB memory stick (FAT) and symlinks
Message-ID: <ibhbgi$643$1@dough.gmane.org>
URL: https://gitlist.dev/e/ibhbgi%24643%241%40dough.gmane.org
In-Reply-To: <7vk4kjhhjh.fsf@alter.siamese.dyndns.org>

```
On 11/11/2010 06:54 PM, Junio C Hamano wrote:
> Gelonida <gelonida@gmail.com> writes:

> 
> If you do need a working tree on the stick, and the stick has a FAT
> derived filesystem (which would be the most common), then you would need
> 
>> git config --add core.fileMode false
> 
> and perhaps "core.symlinks false" also would help

WIll try core,symlinks

```

## Gelonida, 2010-11-11 18:10

Subject: Re: git clone / git pull to USB memory stick (FAT) and symlinks
Message-ID: <ibhbic$643$2@dough.gmane.org>
URL: https://gitlist.dev/e/ibhbic%24643%242%40dough.gmane.org
In-Reply-To: <7vk4kjhhjh.fsf@alter.siamese.dyndns.org>

```
On 11/11/2010 06:54 PM, Junio C Hamano wrote:
> Gelonida <gelonida@gmail.com> writes:
> If you do need a working tree on the stick, and the stick has a FAT
> derived filesystem (which would be the most common), then you would need
> 
>> git config --add core.fileMode false
> 
> and perhaps "core.symlinks false" also would help


Thanks:

Will try core.symlinks false

```

## Ferry Huberts, 2010-11-12 15:06

Subject: Re: git clone / git pull to USB memory stick (FAT) and symlinks
Message-ID: <4CDD57EB.7050200@hupie.com>
URL: https://gitlist.dev/e/4CDD57EB.7050200%40hupie.com
In-Reply-To: <7vk4kjhhjh.fsf@alter.siamese.dyndns.org>

```
IIRC then a FAT filesystem will screw up your repository.
Is that still the case?

We had a few problems with that at work which is why I advised against it.



On 11/11/2010 06:54 PM, Junio C Hamano wrote:
> Gelonida <gelonida@gmail.com> writes:
>
>> I thought about cloning a remote git repository onto the stick
>> and performing
>> - regular pulls in order to update the USB stick
>> - occasional pushes in orderto publish changes performed on the stick.
> ... missing is the reason why this is done to a USB memory stick.  More
> specifically,...
>
>> 1.) Ignore skip / symlinks
>> 2.) Avoiding file permission issues: Is this sufficient
> These become non-issues _if_ the reason you are putting this on an USB
> stick is to safekeep and sneakernet the project data, and are not
> interested in having a working tree on the stick, which I often find is
> the use case after grilling people who ask about placing git repositories
> on an USB stick.
>
> And the commands to interact with such a repository without a working tree
> are to "push" (into it), and "fetch" (from it).  IOW, you do not "pull"
> into USB stick.
>
> If you do need a working tree on the stick, and the stick has a FAT
> derived filesystem (which would be the most common), then you would need
>
>> git config --add core.fileMode false
> and perhaps "core.symlinks false" also would help
> --
> 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


grtz

-- 
Ferry Huberts

```

## Santi Béjar, 2010-11-12 15:59

Subject: Re: git clone / git pull to USB memory stick (FAT) and symlinks
Message-ID: <AANLkTik+9WOO12nOUeJB6X8HGor3pJdHW+mrS7KSHuRP@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTik%2B9WOO12nOUeJB6X8HGor3pJdHW%2BmrS7KSHuRP%40mail.gmail.com
In-Reply-To: <4CDD57EB.7050200@hupie.com>

```
Please, do not toppost.

On Fri, Nov 12, 2010 at 4:06 PM, Ferry Huberts <mailings@hupie.com> wrote:
> IIRC then a FAT filesystem will screw up your repository.
> Is that still the case?

Using very very old git version, yes. But no for newer git. For the repository.

HTH,
Santi

```
