Re: Is rebase always destructive?
- From
Robin Rosenberg <robin.rosenberg.lists@dewire.com>
- Date
- Dec 1, 2008, 20:19 UTC
- Message-ID
- <200812012119.03372.robin.rosenberg.lists@dewire.com>
- In-Reply-To
- <slrngj8884.2srb.csaba-ml@beastie.creo.hu>
måndag 01 december 2008 18:37:43 skrev Csaba Henk:
Show 12 quoted lines
> On 2008-12-01, Nick Andrew <nick@nick-andrew.net> wrote: > > On Mon, Dec 01, 2008 at 11:41:39AM +0000, Csaba Henk wrote: > >> I can't see any option for rebase which would yield this cp-like > >> behaviour. Am I missing something? > > > > How about this: > > > > git checkout topic > > git branch keepme > > git rebase master > > OK, thanks guys, now I'm enlightened (a little bit more than before).
And if you forgot to create the keepme branch you can access the previous version using the topic@{1} or topic@{'1 hour ago'} etc. This uses the reflog that tracks all "versions" of your branch. Keeping gitk running is nice way to see previous versions (press F5 after rebase).
-- robin