1

I am new to Git and after I lots of searching I found that I must have set Linux permissions in my Git server.

But I want to know, is it possible to set permissions in Git? I am working on a team about six people and I don't like to everyone on the team can access all the project for security reasons.

For example, If somebody in my team works on UI in my Store section I want to he/she have it's own branch but when he/she PULL the project with Git just have access to files and folders I let.

I have to add that I have my own Git server on a local network using Linux Debian and I'm using "SourceTree" as my GUI for Git and I have few experience on Git command line, so I need do it from GUI if possible.

Edited: Does Git lab support permission like this: I have a repository that uses Laravel framework and I'd like to set permission for UI developers that only access views and PHP developers access some controllers not all the part of the controller in the project.

3 Answers 3

3

You can checkout GitLab: https://about.gitlab.com/ for this. Out of the box git does not support what you need/want.

2
  • Does Git lab support permission like this: I have a repository that uses Laravel framework and I'd like to set permission for UI developers that only access views and PHP developers access some controllers not all the part of the controller in the project.
    – Amir H
    Commented Jun 11, 2015 at 9:28
  • I don't think this is at all possible with git without generating several repositories. One for each group of developers.
    – Willi
    Commented Jun 12, 2015 at 7:30
2

No, Git doesn't manage this directly. Anyone with authentication credentials to the repository has access to the entire repository.

Traditionally, this is managed with third-party solutions, such as Gitolite, GitHub private repositories, and other systems.

1

In addition to other answers: if you want only certain parts of project to be accessible to each developer, you can use git submodules.

This is also preferable if project has logically and functionally separate parts. (Like front-end and back-end. )

Not the answer you're looking for? Browse other questions tagged or ask your own question.