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

Re: copy selected history between repostories

From
Avery Pennarun <apenwarr@gmail.com>
Date
Jul 18, 2008, 17:12 UTC
Message-ID
<32541b130807181012o3b56c413g31667baca1732b01@mail.gmail.com>
In-Reply-To
<18533605.post@talk.nabble.com>
On 7/18/08, luisgutz <luis@xmos.com> wrote:
>  Is there any way to import that directory into repoA with all it's history,
>  but NOT the history from the other commits?
>  Another way of putting is this: can I make git forget the history of all
>  other commits but those from this directory?

Try cloning the repository, then running git-filter-branch with the --subdirectory-filter option. It works quite nicely.

Have fun,
Avery
Previous: luisgutzNext: Nick Andrew
Message 2 of 5 in “copy selected history between repostories”
  1. luisgutzJul 18, 2008
  2. Avery PennarunJul 18, 2008
  3. Nick AndrewJul 19, 2008
  4. Johannes SchindelinJul 19, 2008
  5. Jeff KingJul 19, 2008

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.