git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jed Brown <jed@59A2.org>
To: Git List <git@vger.kernel.org>
Subject: Find/prune local branches after upstream branch is deleted?
Date: Fri, 19 Apr 2013 12:11:38 -0500	[thread overview]
Message-ID: <87ehe64f91.fsf@mcs.anl.gov> (raw)

Consider this workflow:

$ git checkout -b my/branch
hack, commit, ...
$ git push -u origin my/branch

The branch gets reviewed, merged, and eventually deleted upstream.  The
remote tracking branch gets pruned via 'git fetch --prune' or 'git
remote prune', but that leaves my local branch with an upstream that has
been deleted.  Is there a good way to discover this so I can prune my
local branches?

$ git branch -vv
  my/branch        6d32ec0 [origin/my/branch] The commit message

I can script it, but this seems like a pretty common thing.

             reply	other threads:[~2013-04-19 17:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-19 17:11 Jed Brown [this message]
2013-04-19 17:37 ` Find/prune local branches after upstream branch is deleted? Jeff King
2013-04-19 17:50   ` Jed Brown
2013-04-19 18:05     ` Jeff King
2013-04-19 19:30       ` Jed Brown

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=87ehe64f91.fsf@mcs.anl.gov \
    --to=jed@59a2.org \
    --cc=git@vger.kernel.org \
    /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).