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

Re: incorporating the past

From
Shawn O. Pearce <spearce@spearce.org>
Date
Apr 9, 2007, 18:32 UTC
Message-ID
<20070409183210.GX5436@spearce.org>
In-Reply-To
<87d52d1kli.fsf@mid.thomas-huehn.de>
Thomas H??hn <newsgroups@thomas-huehn.de> wrote:
Show 15 quoted lines
> I have a file under version control, that I got at the point of file
> version 1.0. I start committing changes:
> 
> o--o--o--o--o--o--o
> ^                 ^
> git init,         current,
> version 1.0       version 1.6
> 
> Then I get the history up to my version 1.0 from somewhere else (former
> maintainer, whatever). In the form of plain text files, one for each
> version; say, versions 0.1 thru 0.9. I want to incorporate this past
> into my tree.
>
> Or can I do the same, only up to 0.9 instead of 1.0, and then "sew
> together" those histories?

Yes. Look at the `grafts' file. You can create a new repository of the 0.9..1.0 history, then graft that repository as a new parent of the 1.0 commit. This lets you join in the old history behind the existing history. The Linux kernel folks have done this for the kernel repository.

-- 
Shawn.
Previous: Thomas HühnNext: Junio C Hamano
Message 2 of 3 in “incorporating the past”
  1. Thomas HühnApr 9, 2007
  2. Shawn O. PearceApr 9, 2007
  3. Junio C HamanoApr 9, 2007

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.