From: Alex Henrie <alexhenrie24@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Konstantin Khomoutov <kostix@bswap.ru>, git@vger.kernel.org
Subject: Re: [PATCH] branch: introduce --(no-)has-upstream and --(no-)gone options
Date: Thu, 16 Feb 2023 20:12:08 -0700 [thread overview]
Message-ID: <CAMMLpeQgxPCTsWGr58rutSDnRuGAGcTXTvHLcgWAfzZjZGxakg@mail.gmail.com> (raw)
In-Reply-To: <xmqq1qmpp7bh.fsf@gitster.g>
On Thu, Feb 16, 2023 at 3:40 PM Junio C Hamano <gitster@pobox.com> wrote:
>
> Konstantin Khomoutov <kostix@bswap.ru> writes:
>
> > Alex Henrie <alexhenrie24@gmail.com> writes:
> >
> >> GitHub and GitLab have features to create a branch using the web
> >> interface, then delete the branch after it is merged. That results in a
> >> lot of "gone" branches in my local clone, and I frequently find myself
> >> typing `git branch -v | grep gone`. I don't want `git branch --merged`
> >> because that would include branches that have been created for future
> >> work but do not yet have any commits.
> >
> > Possibly a rather silly remark, but you could make a habit of periodically
> > running
> >
> > git remote prune <remotename>
> >
> > or fetching with "--prune".
>
> Likely to be a silly question, but isn't doing that, to actively
> remove the remote tracking branches that correspond to branches that
> no longer exist at the remote, exactly what gives Alex many local
> branches that are marked as "gone" (i.e. forked from some upstream
> sometime in the past, but the upstream no longer exists)?
Yes, the branches are marked [gone] precisely because I configured
fetch.prune to true. So fetching automatically deletes the local
copies of the upstream branches, but the local branches that track
them are still there.
-Alex
next prev parent reply other threads:[~2023-02-17 3:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-16 4:14 [PATCH] branch: introduce --(no-)has-upstream and --(no-)gone options Alex Henrie
2023-02-16 19:00 ` Junio C Hamano
2023-02-17 3:07 ` Alex Henrie
2023-02-16 19:32 ` Konstantin Khomoutov
2023-02-16 22:35 ` Junio C Hamano
2023-02-17 3:12 ` Alex Henrie [this message]
2023-02-17 11:10 ` Konstantin Khomoutov
2023-02-17 10:50 ` Phillip Wood
2023-02-17 19:44 ` Junio C Hamano
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=CAMMLpeQgxPCTsWGr58rutSDnRuGAGcTXTvHLcgWAfzZjZGxakg@mail.gmail.com \
--to=alexhenrie24@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=kostix@bswap.ru \
/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).