From: "Ævar Arnfjörð Bjarmason" <firstname.lastname@example.org>
To: Philip Oakley <email@example.com>
Cc: Git Mailing List <firstname.lastname@example.org>
Subject: Re: Command to list <pattern> Branches on a specific Remote (i.e. select from rtb's)
Date: Sat, 18 May 2019 20:37:10 +0200 [thread overview]
Message-ID: <email@example.com> (raw)
On Sat, May 18 2019, Philip Oakley wrote:
> I'm unsure if there is a command for this.
> Currently I have 1600+ remote tracking branches (rtb) for my Git repo
> as it covers both git.git and git-for-windows and some other
> Finding a specific rtb for a particular remote looks like there ought
> to be a simple command ready to do the job, but I haven't found
> Is there a command or simple simple invocation of branch, show-ref,
> for-each-ref, etc that can be give a branch pattern and remote name to
> quickly filter down the list of potential branches to just one or two
> 24-line screens?
git for-each-ref 'refs/remotes/<remote>/<pattern>'
git branch -a -l '<remote>/<pattern>'
The latter will conflate <remote> with any local branches you happen to
have prefixed with <remote>.
The reason this isn't some easy mode in some command is because there's
no hard notion that a given remote "owns" a given set of RTB's. It's
just convention, but they can and do overlap sometimes.
See the logic in 'git remote remove' that needs to decide if a deletion
of a remote should delete its remote tracking refs: 7ad2458fad ("Make
"git-remote rm" delete refs acccording to fetch specs", 2008-06-01)
next prev parent reply other threads:[~2019-05-18 18:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-18 15:16 Command to list <pattern> Branches on a specific Remote (i.e. select from rtb's) Philip Oakley
2019-05-18 18:37 ` Ævar Arnfjörð Bjarmason [this message]
2019-05-18 19:44 ` Philip Oakley
2019-05-19 3:07 ` Duy Nguyen
2019-05-19 9:49 ` Philip Oakley
2019-05-28 12:13 ` [PATCH] doc branch: provide examples for listing remote tracking branches Philip Oakley
2019-05-28 13:58 ` Junio C Hamano
2019-05-28 14:17 ` Philip Oakley
2019-05-28 14:51 ` Philip Oakley
2019-05-28 15:51 ` Junio C Hamano
2019-05-28 16:17 ` Philip Oakley
2019-05-28 23:16 ` [RFC/PATCH v2] " Philip Oakley
2019-06-10 17:57 ` Junio C Hamano
2019-06-14 21:00 ` Philip Oakley
2019-05-19 3:05 ` Command to list <pattern> Branches on a specific Remote (i.e. select from rtb's) Duy Nguyen
2019-05-28 13:57 ` Junio C Hamano
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:
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* 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.
Code repositories for project(s) associated with this public inbox
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 read-only IMAP folder(s) and NNTP newsgroup(s).