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

Copying files and keeping the history

From
JJörgenHägg <jorgen.hagg@axis.com>
Date
Jun 11, 2009, 13:20 UTC
Message-ID
<18567.1244726405@zev.se.axis.com>
I have two completely different git repositories, A and B.

I want to move a file from repo A to B without losing the files history. That is, I want the commit message and all other info from each commit where the file was included to generate new commits in repo B. (Yes, I know git manages content, not files. :-)

In other words, export a bunch of commits, filtering out the patches for the file and import these in another repo.

Sort of importing from cvs to git, only the source and destination are both git repositories.

I tried tailor from git to git, but that was probably not what tailor wanted to do. :-)

Is this somehow possible?
Next: Sverre Rabbelier
Message 1 of 3 in “Copying files and keeping the history”
  1. JörgenHäggJun 11, 2009
  2. Sverre RabbelierJun 11, 2009
  3. Avery PennarunJun 12, 2009

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.