version control - Create new git repository excluding history but allow merges back -
i have tricky git situation. have single git repository, need share organization, , allow them modify , submit changes me (and keep updated future changes make). however, there number of files in repository contain proprietary information legally cannot disclose. can't remove these files repository entirely, since critical things presently working on.
ideally, move proprietary files separate repository/library, minor refactoring project , i'd avoid if can. currently, proprietary , non-proprietary files intermingled throughout same directory structure.
my goals follows
provide them repository without proprietary files. don't care if don't have access revision history, can "fresh" copy 1 commit.
allow them submit new commits me update repository.
(ideally) allow them accept new commits me, containing changes made non-proprietary files.
is there way in git, while still allowing me have single repository proprietary , non-proprietary components?
this sounds job a git submodule. 1 way go be
clone
repo inside of itselfcd
parent repo,git submodule add <child repo>
- the child repo private files,
git rm
other files avoid duplicates parent repo
now in parent repo, need git filter-branch
out private files. controversial step because rewrite history way first commit of private file.
finally can maintain both repos, , share parent repo without worry.
Comments
Post a Comment