git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Grafting Alternate History

From
Ddag@cray.com <dag@cray.com>
Date
Aug 31, 2012, 23:39 UTC
Message-ID
<nng7gse7hrl.fsf@transit.us.cray.com>

I have an unfortunate situation where I have two subversion repositories for the same project, one a public version and one a private version. Because they are mirrors of svn repositories, they have very different histories as far as git is concerned. This is not all that uncommon but of course I would like to manage things in git.

git-svn is great for interacting with one svn repository. The public svn repository has a fully-supported git mirror. The private repository also has a fully-supported git mirror. But I need to check in changes to the private repository via git-svn. I eventually need to check in changes to the public repository as well but that is orders of magnitude less frequent. A manual diff+patch+git-svn is acceptable for now.

I am wondering if it's possible to graft the history of one of the git mirrors onto an empty branch of the other and share changes between them. I need to take updates from the public repository and apply them to the private repository. This is a frequent operation. I have been essentially using manual diff+patch but that is highly error-prone and annoying.

For example, let's say we take a local copy of the private repository. I would like to somehow create an empty branch in that local copy and then populate it with the history of the public repository. I would like to be able to specify a git diff-like command on the public graft branch to get some changes over a range of commits and apply those changes to one of the private branches (say master). If I could use a git-merge-like or git-rebase-like command, so much the better. I would like to do the same in reverse but as I said that is a much less common operation.

Has anyone done anything like this before? Is it even theoretically possible to manage disjoint histories like this?

Thanks for your help!
                            -Dave
Next: Andreas Schwab
Message 1 of 3 in “Grafting Alternate History”
  1. dag@cray.comAug 31, 2012
  2. Andreas SchwabSep 1, 2012
  3. dag@cray.comSep 4, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.