Re: newb: Given a commit id, find which branches have it as an ancestor

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

 



Kelly F. Hickel schrieb:
>> From: git-owner@xxxxxxxxxxxxxxx [mailto:git-owner@xxxxxxxxxxxxxxx] On
>> Behalf Of Johannes Sixt
>> Sent: Thursday, March 12, 2009 10:38 AM
>> To: Kelly F. Hickel
> 
>> $ git branch -a --contains the-sha1
>>
>> -- Hannes
>>
> 
> Thanks, that looks like a really useful command.
> 
> Unfortunately, in this case it didn't print anything out (neither did
> "git branch -r -a sha1").
> 
> What I'm beginning to suspect is that all the commits that should have
> gone to master went to some unnamed branch.
> Is that reasonable/possible/likely?  This commit has a full ancestry,
> but doesn't appear to be on any branch.
> 
> In the above question there's an assumption that if a branch exists
> without a name, then git branch -a --contains wouldn't print anything
> out, is that correct?

Correct.

Your best bet is perhaps that you create a branch at the commit

  $ git branch tmp-branch your_sha1

so that the commits are not lost, then you cherry-pick them to master.

-- Hannes

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

  Powered by Linux