# Can git restrict source files ?

3 messages from 2013-02-19 to 2013-02-19. Participants: Juan Pablo, Matthieu Moy, Ævar Arnfjörð Bjarmason.
Thread: https://gitlist.dev/t/32944

## Juan Pablo, 2013-02-19 16:06

Subject: Can git restrict source files ?
Message-ID: <DE551AEA-5C7D-4A2D-8AB4-33195EF351F8@gmail.com>
URL: https://gitlist.dev/e/DE551AEA-5C7D-4A2D-8AB4-33195EF351F8%40gmail.com

```
Hi, 

I have a question, can i control the access to specific files or folders ?? I need that some developers can't see some source files, thank you very much for your time

Enviado desde mi iPhone
```

## Matthieu Moy, 2013-02-19 16:17

Subject: Re: Can git restrict source files ?
Message-ID: <vpq4nh8p9bj.fsf@grenoble-inp.fr>
URL: https://gitlist.dev/e/vpq4nh8p9bj.fsf%40grenoble-inp.fr
In-Reply-To: <DE551AEA-5C7D-4A2D-8AB4-33195EF351F8@gmail.com>

```
Juan Pablo <juanpablo8517@gmail.com> writes:

> Hi, 
>
> I have a question, can i control the access to specific files or
> folders ?? I need that some developers can't see some source files,
> thank you very much for your time

No, you can't. You can use e.g. gitolite to set up access control for a
branch, but Git needs access to the complete tree.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

```

## Ævar Arnfjörð Bjarmason, 2013-02-19 17:55

Subject: Re: Can git restrict source files ?
Message-ID: <CACBZZX7tHpUzW8pKjLi_4qm8w-n=FjResyRwZPK9qsyUzqpsMw@mail.gmail.com>
URL: https://gitlist.dev/e/CACBZZX7tHpUzW8pKjLi_4qm8w-n%3DFjResyRwZPK9qsyUzqpsMw%40mail.gmail.com
In-Reply-To: <DE551AEA-5C7D-4A2D-8AB4-33195EF351F8@gmail.com>

```
On Tue, Feb 19, 2013 at 5:06 PM, Juan Pablo <juanpablo8517@gmail.com> wrote:
> I have a question, can i control the access to specific files or folders ?? I need that some developers can't see some source files, thank you very much for your time

No, but what you can do is to split these up into different
repositories. E.g. where I work we have a puppet.git and a
secrets.git, the latter contains passwords and other secret data, the
former just uses macros to include that and is accessible to everyone.

```
