0

I would like to share my code with a freelancer, but without access to a couple of files and the git history. If I delete those files and the history, how can I easily merge everything back afterwards?

am-rails
  • 1,463
  • 2
  • 16
  • 40

1 Answers1

1

You could initialize a branch with which the freelancer has access.

From there, you could frequently merge his commits into your production or development branch.

I'm not sure if Github supports this functionality, but I know that Bitbucket allows administrators to create user groups that have access to certain branches.

Here is the documentation for said functionality.

Chad Pendergast
  • 366
  • 1
  • 4
  • 11
  • That's for write restrictions. Does a branch not have read-access to previous code? – am-rails Mar 30 '15 at 16:25
  • I think I need to see how to treat code from a different git repo like a branch. – am-rails Mar 30 '15 at 16:25
  • You could work with forks, [here's](http://stackoverflow.com/questions/1123344/merging-between-forks-in-github) an existing post about merging between forks – Chad Pendergast Mar 30 '15 at 16:31
  • Forks keep history. I think I'll need to merge 2 separate projects: http://stackoverflow.com/questions/13040958/merge-two-git-repositories-without-breaking-file-history/ – am-rails Mar 30 '15 at 16:46