Re: How to do a reverse rebase?
- From
- linux@horizon.com <linux@horizon.com>
- Date
- Aug 20, 2007, 10:39 UTC
- Message-ID
- <20070820103943.6046.qmail@science.horizon.com>
- In-Reply-To
- <20070820055809.GZ27913@spearce.org>
> I don't think so. To do the merge of those files we need a working > directory to operate in; that working directory is the one you have. > It sounds like what you want is this:
Show 5 quoted lines
> old=`git symbolic-ref HEAD` && > git checkout HEAD^0 && > git cherry-pick debug_hack && > git branch -f debug_hack HEAD && > git checkout $old
Er, actually, I don't want the messing about with $old. At the end of the day, I want to be on the tip of the rebased work.
The problem is that git-cherry-pick only oves a single comit, so if I have a stack, it's annoying.
It's more like: git checkout HEAD^0 && for i in `git-rev-list --reverse ..debug_hack`; do git-cherry-pick $i done && git branch -D debug_hack && git checkout -b debug_hack