Configuring a Git Remote with a Truncated History

I have been doing some non-standard, possibly doomed, experiments on a git repository. The goal is to create a truncated history remote repository that can still share commits with an internal repository that has full history.

I have had some success using graft to link public history to private history - when I log out of my internal repository, only post-graft content is included.

So my main question is, what's the simplest way to take a commit, eliminate its parent, and write a graft instead of a parent?

The more general question is, what am I trying to do to hurt me in the long run, do you know if there is a better way?

+2


a source to share


1 answer


Scott Chacon says something similar to what you describe in a recent Pro Git post ( updated location


). He uses git rebase --onto

it to split the story in two, later showing you how to use it git replace

to restore the story later if you want to. I've never done this myself, but he explained in detail in his post. Lots of charts too.
+1


a source







All Articles