Outspaced
Outspaced

Reputation: 408

Giving access to parts of a github repository

I have a repository on Github for which I would like to give access to a freelancer.

I can't give them access to the entire codebase for security reasons, but I would like to be able to merge their changes from the sections that I do give them access to.

If I create a fork and remove the restricted files then it still has the history available, so that doesn't really work.

What would be the best way to go about this?

Upvotes: 2

Views: 767

Answers (1)

Wes Hardaker
Wes Hardaker

Reputation: 22252

If you want to remove the files from the history and publish it as-is, then consider using git filter-branch, which will let you narrow a project down to just some components of the original complete repository.

Putting the code you want them to see into a submodule would be the other way to go, and give them access to just the submodule.

Upvotes: 8

Related Questions