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