'Give developer access to selected files and folders

I have an application developed in Codeigniter and want to hire different developers for different functionalities on the application.

I don't want to give full access to all developers lest they copy and sell to competitor, as I have invested a lot of time and money in this application.

So far I have implemented this partially by restricting the ftp access to a particular folder, but then they get all files access in that folder, which is not an ideal solution. I have created a dev env using the copy of production code.

Now, is there a way I can give access to a particular file using git (if needed) and the developers can update that and commit that code from git and the changes are pushed to my server, and they can test it.

I will really appreciate your inputs and suggestions.



Solution 1:[1]

Now, is there a way I can give access to a particular file using git ...

No. Git is about commits. Every commit holds a full snapshot of every file. If you give someone a commit, they have access to all the files in that commit. If you don't give someone a commit, they have none of the files. To give someone some particular subset of files that go with one or more commits, you need to use something outside of Git.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 torek