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

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

From
Shawn O. Pearce <spearce@spearce.org>
Date
May 27, 2010, 21:03 UTC
Message-ID
<20100527210328.GN16470@spearce.org>
In-Reply-To
<AANLkTinV5mEACphA-nW9URce0Mh9xyu3UjWmfBqL6cLN@mail.gmail.com>
Chris Packham <judge.packham@gmail.com> wrote:
Show 16 quoted lines
> What I've ended up with is a repository with a detached set of changes i.e
> 
> o -o   l - l - l - l - l - l     o - master
>      \                          /
>       o - o - o - o - o - o
> 
> o = our commits
> l = linux commits
> 
> Because the code is common textually I think what I really should have done is
> 
> (cd linux-2.6.32.y; git format-patch v2.6.32.12..v2.6.32.14) | git am
> 
> 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?

If I read your diagram right, the l-l-l chain isn't connected at all to your graph, so it should just get removed with `git gc`.

But if it is connected due to a merge with your master, lookup the merge and find its parent which is your local stuff and `git reset --hard` to that commit.

-- 
Shawn.
Previous: Chris PackhamNext: Chris Packham
Message 2 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.