On Wed, Sep 27, 2017 at 12:52:34PM -0400, Paul Smith wrote:

> Hi all.  I'm wondering if anyone has a script or something that will
> allow me to create a new repository which recreates the commit
> structure (parent/child, branches, merges) of an existing repository,
> but with obfuscated content.  It's OK if this is slow.
> 
> My goal is to provide a test case that can reproduce a failure that
> appears only in our long-lived and complex Git repository, without
> having to hand over the actual content of the Git repository.
> 
> Obviously the SHAs would not be the same, but that's not relevant (I'm
> sure).  My suspicion is that the problem is caused by the very complex
> spaghetti branching structure we used to live with back in 2011/2012,
> before we imposed sanity.

You need the `git filter-branch` command.

To make it as fast as possible, you can use it with the "--index-filter"
command-line option and script around it with `git cat-file` and
`git update-index`.

If you'd prefer to trade speed for easiness of implementation, consider
the "--tree-filter" command-line option instead.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to