Thread (5 messages) flat view 5 messages, 3 authors, 2016-06-15

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

From: Avery Pennarun <hidden>
Date: 2016-06-15 22:48:52

On Thu, May 27, 2010 at 4:46 PM, Chris Packham [off-list ref] 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help