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

Re: git fast-export/fast-import *facepalm*

From
Avery Pennarun <apenwarr@gmail.com>
Date
May 27, 2010, 21:19 UTC
Message-ID
<AANLkTimgh-1u9_p9SzB6DlP_gPDBiPJZkg-Hjvpq0eCM@mail.gmail.com>
In-Reply-To
<AANLkTinV5mEACphA-nW9URce0Mh9xyu3UjWmfBqL6cLN@mail.gmail.com>
On Thu, May 27, 2010 at 4:46 PM, Chris Packham <judge.packham@gmail.com> wrote:
Show 6 quoted lines
> My brain melt came when I wanted to get the set of changes between 2
> versions from a public branch and import them into our repository.
> Having just learned about git fast-export I decided that it was the
> right tool for the job so I did the following
>
> (cd linux-2.6.32.y; git fast-export v2.6.32.12..v2.6.32.14) | git fast-import
Personally what I would do is use git rebase instead:

# WARNING: untested. back up your repo first! cd my-repo git fetch ../linux-2.6.32.y v2.6.32.14 git branch b FETCH_HEAD git fetch ../linux-2.6.32.y v2.6.32.12 git branch a FETCH_HEAD git checkout b git rebase --onto master a # now your branch b should be master + the patches from a..b

> Which I'll give a try in a minute. In the meantime is there anyway for
> me to safely remove the upstream linux commits without loosing our
> commits in the process?
Looks like Shawn answered this question.  In any case, the answer is git-reset.
Have fun,
Avery
Previous: Avery PennarunNext: Chris Packham
Message 5 of 8 in “git fast-export/fast-import *facepalm*”
  1. Chris PackhamMay 27, 2010
  2. Shawn O. PearceMay 27, 2010
  3. Chris PackhamMay 27, 2010
  4. Avery PennarunMay 27, 2010
  5. Avery PennarunMay 27, 2010
  6. Chris PackhamMay 27, 2010
  7. Chris PackhamMay 27, 2010
  8. Chris PackhamMay 27, 2010

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.