1

We have an internal, corporate repository that I would like to make public, but with all internal information removed (like credentials, internal company structures, etc).

How can I achieve this? When I create a branch, it will contain the entire history. Basically I want to keep the two in sync, but still keep the public repository clean of any critical information.

Is this doable with a branch of some sort? I tried around a bit, but it always keeps pushing the complete history (which kind of makes sense).

The problem is: Currently, critical information is in the history. If I remove that in a commit, the removal will be part of the public history.

Basically, I want the "public" branch to start at a certain point of the actual history, without including any parents, but in the future follow the same history... How can I do this?

F.P
  • 17,421
  • 34
  • 123
  • 189

1 Answers1

1

I would say create a graft for your "starting point" and then it should be seemless possible to go ahead with a normal branch:

see:

I hope it helps!

Community
  • 1
  • 1
bittracker
  • 26
  • 1
  • Trying to push that into our corporate repository results in "missing necessary objects"? – F.P Jan 18 '17 at 10:43
  • @FlorianPeschka I don't know why you getting the "missing necessary objects" message. But the general workflow is: 1. clone your existing repo 2. make a new commit to the cloned repo. 3. take the new commit id and add them to `.git/info/grafts` on the new clone 4. check wath you have done with git log – bittracker Jan 18 '17 at 13:09