From: Neal Kreitzinger <nkreitzinger@gmail.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: ryenus <ryenus@gmail.com>, git@vger.kernel.org
Subject: Re: [RFE] option for find branches in a remote repo which contain a certain commit
Date: Fri, 22 Jun 2012 13:52:10 -0500 [thread overview]
Message-ID: <4FE4BEDA.20608@gmail.com> (raw)
In-Reply-To: <CACBZZX6nbWCFWWy5NTMSAPOf4RHUAbC9TuffPPy=2Ehn7KSnaA@mail.gmail.com>
On 6/22/2012 10:24 AM, Ævar Arnfjörð Bjarmason wrote:
> 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
prev parent reply other threads:[~2012-06-22 18:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAKkAvazNqZWk=QRmSFsFL33M6z+nZZ_yyxxbxwAh=fQk5DVt-Q@mail.gmail.com>
2012-06-22 14:58 ` [RFE] option for find branches in a remote repo which contain a certain commit ryenus
2012-06-22 15:24 ` Ævar Arnfjörð Bjarmason
2012-06-22 18:14 ` Junio C Hamano
2012-06-22 18:52 ` Neal Kreitzinger [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FE4BEDA.20608@gmail.com \
--to=nkreitzinger@gmail.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=ryenus@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).