Reputation: 6612
we've working on an ERP project in our company as a team and Our team has a number of members.
Each team member works on specific module that I have determined for them.
To manage codes , we're using git , gitlab and SourceTree git GUI.
The challenge we are facing is when a new member is added to team. In fact I do not want a new member can access to whole project codes. But for other members who have a long history and are trusted is not any limit to access codes.
In fact I am looking for a way that each member can access only to their own codes, means that they can push last changes in their code but can not pull whole project from master for example.
Upvotes: 1
Views: 146
Reputation: 2442
I'll say that what you need is Submodules.
Basically, don't give access to new team members to the whole project at all. Create a new git repository for the modules you want to develop and give them access to this repository only.
Then in your main project do this :
git submodule add https://github.com/yourcompany/yourSuperModule
This way you'll have a folder in your project directory called yourSuperModule with the files of your new team member's repository. And the new team member won't have any clue on what is going on in the main project.
Here's a nice article explaining submodules and how to use them.
Upvotes: 4