Re: How to find all the commits that comprise a branch?

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

 



On Thu, May 31, 2012 at 5:22 AM, Sitaram Chamarty <sitaramc@xxxxxxxxx> wrote:
> On Wed, May 30, 2012 at 11:09 PM, Felipe Contreras
> <felipe.contreras@xxxxxxxxx> wrote:
>> Hi,
>>
>> Basically what I want to do is:
>>
>>  % git log branch ^<any-other-branch>
>>
>> IOW; all the commits were 'git branch --contains' would show 'branch'
>> and nothing else.
>
> I have a script called "otb" (only this branch, I guess; I tend to use
> crappily short names for stuff I don't make public!) that looks like
> this:
>
> #!/bin/bash
>
> m=$(git rev-parse HEAD)
> n=$(git rev-parse --branches | grep -v $m)
> git log --oneline $m --not $n
>
> I think that fits your description, but it's not *one* command.

Yeap, I was thinking on doing something along those lines... but hoped
there was a single command for it.

Cheers.

-- 
Felipe Contreras
--
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]