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

Re: Git fast-import file format question

From
Shawn O. Pearce <spearce@spearce.org>
Date
Jul 7, 2009, 19:10 UTC
Message-ID
<20090707191055.GA11191@spearce.org>
In-Reply-To
<1e30a6d10907071206u21ecd9d8wb53441a3bf7b64c4@mail.gmail.com>
Troy Telford <ttelford.groups@gmail.com> wrote:
Show 6 quoted lines
> When I was looking at the man page for git-fast-import (and looking at
> the output of git-fast-export for a valid git repo), I noted the
> "from" directive.  There's a clip there that tells me that "Omitting
> the from command on existing branches is usually desired, as the
> current commit on that branch is automatically assumed to be the first
> ancestor of the new commit."
That section meant "existing branches within this import session".

To restart an import, you need to use the from command in the first commit of that session, e.g. to restart an import on refs/heads/master use:

  from refs/heads/master^0
-- 
Shawn.
Previous: Troy Telford
Message 2 of 2 in “Git fast-import file format question”
  1. Troy TelfordJul 7, 2009
  2. Shawn O. PearceJul 7, 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.