Re: [BUG] - git rebase -i performs rebase when it shouldn't?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]