From: Jeff King Date: Sat, 10 Apr 2010 04:47:30 GMT Subject: Re: [BUG] - git rebase -i performs rebase when it shouldn't? Message-ID: <20100410044730.GB24295@coredump.intra.peff.net> In-Reply-To: <7vsk73zzt1.fsf@alter.siamese.dyndns.org> On Fri, Apr 09, 2010 at 09:39:22PM -0700, Junio C Hamano wrote: > I used to religiously rebase slushy topics that are not in any stable > integration branches (we used to have only 'master' and 'pu'), and > > git rebase master foo > git rebase master bar > git rebase master baz > > was far easier to type than > > git checkout foo && git rebase master > git checkout bar && git rebase master > git checkout baz && git rebase master Interestingly, I faced a similar problem a few months ago. I have many half-finished topics, and I aggressively rebase them against master (mostly to see and fix conflicts early). But I wrote a script so I don't have to type each one individually. :) It uses for-each-ref with a filter to get the list of topics, and then rebases in a loop. It just barfs when a rebase has conflicts, which is OK. You fix them, finish the rebase, and restart the script, which just skips over the noop rebases. Eventually it finishes successfully. -Peff