git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Avery Pennarun <apenwarr@gmail.com>
To: Chris Packham <judge.packham@gmail.com>
Cc: GIT <git@vger.kernel.org>
Subject: Re: git fast-export/fast-import *facepalm*
Date: Thu, 27 May 2010 17:19:58 -0400	[thread overview]
Message-ID: <AANLkTimgh-1u9_p9SzB6DlP_gPDBiPJZkg-Hjvpq0eCM@mail.gmail.com> (raw)
In-Reply-To: <AANLkTinV5mEACphA-nW9URce0Mh9xyu3UjWmfBqL6cLN@mail.gmail.com>

On Thu, May 27, 2010 at 4:46 PM, Chris Packham <judge.packham@gmail.com> wrote:
> 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

      parent reply	other threads:[~2010-05-27 21:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-27 20:46 git fast-export/fast-import *facepalm* Chris Packham
2010-05-27 21:03 ` Shawn O. Pearce
2010-05-27 21:57   ` Chris Packham
2010-05-27 22:01     ` Avery Pennarun
     [not found]       ` <AANLkTin-SCsgxAUCCYILIHaq-sLDfCgTDfY_Kvc5UVSt@mail.gmail.com>
     [not found]         ` <AANLkTinJd1hZE6LiJRHWYknS7e2YUHtKApTaKfpPPfKJ@mail.gmail.com>
2010-05-27 22:18           ` Chris Packham
2010-05-27 22:57             ` Chris Packham
2010-05-27 23:03               ` Chris Packham
2010-05-27 21:19 ` Avery Pennarun [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTimgh-1u9_p9SzB6DlP_gPDBiPJZkg-Hjvpq0eCM@mail.gmail.com \
    --to=apenwarr@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=judge.packham@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).