Amir H
Amir H

Reputation: 1126

how to set permission in Git?

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.

Upvotes: 1

Views: 248

Answers (3)

Nick Volynkin
Nick Volynkin

Reputation: 15079

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. )

Upvotes: 1

Willi
Willi

Reputation: 46

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

Upvotes: 3

Makoto
Makoto

Reputation: 106389

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.

Upvotes: 2

Related Questions