Re: [RFE] option for find branches in a remote repo which contain a certain commit
- From
- Neal Kreitzinger <nkreitzinger@gmail.com>
- Date
- Jun 22, 2012, 18:52 UTC
- Message-ID
- <4FE4BEDA.20608@gmail.com>
- In-Reply-To
- <CACBZZX6nbWCFWWy5NTMSAPOf4RHUAbC9TuffPPy=2Ehn7KSnaA@mail.gmail.com>
On 6/22/2012 10:24 AM, Ævar Arnfjörð Bjarmason wrote:
Show 9 quoted lines
> On Fri, Jun 22, 2012 at 4:58 PM, ryenus <ryenus@gmail.com> wrote: >> Given a certain commit, I want there's a command/option for git to >> make it search the remote repo (e.g. origin) and tell me the >> branches there which contain that commit. > > git branch --contains <commit> > git branch -a --contains <commit> > git tag --contains <commit> >
>> ...The reason I need this is that there are hundreds of... >> branches, but I just need a few of them, and don't want to fetch all >> other branches...
You could have a 'query repo' that is a local clone of the remote repo. Fetch all branches to the local query repo and then use AEvar's suggested commands. Once you find the branches you want then you can git remote add -t them.
v/r, neal