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

Re: Getting Commits from One Repository to Another

From
Jeff King <peff@peff.net>
Date
May 22, 2009, 07:26 UTC
Message-ID
<20090522072606.GA1409@coredump.intra.peff.net>
In-Reply-To
<loom.20090521T200115-589@post.gmane.org>
On Thu, May 21, 2009 at 08:08:01PM +0000, Ryan wrote:
Show 5 quoted lines
> Thanks to both of you for your help. I tried Peff's suggestion last
> night, and could not get it to work. Matthieu is correct that the
> public repo was not a clone but a fresh import. Furthermore, I
> discovered that work had been done between the last pull from private
> the the import into public. (Ugh!)

Ah, OK, I missed that when reading your initial report. Matthieu's suggestion is the correct one, then.

Show 7 quoted lines
> Anyway, before I saw Matthieu's post (away from internet, which is so
> rare these days), I managed to succeed by using git format-patch on
> the commits that I needed, and then used git am on the private repo.
> There was one conflict, but I was able to resolve it.
> 
> Hopefully I'm not faced with this problem again, but if so, I'll try
> Mattieu's suggestion.

Actually, you will find that "git rebase" is basically "format-patch | am" under the hood, so you more or less did the same thing (but calling rebase probably would have been a little more convenient).

-Peff
Previous: Ryan
Message 5 of 5 in “Getting Commits from One Repository to Another”
  1. Big LebowskiMay 20, 2009
  2. Jeff KingMay 21, 2009
  3. Matthieu MoyMay 21, 2009
  4. RyanMay 21, 2009
  5. Jeff KingMay 22, 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.