Re: Find/prune local branches after upstream branch is deleted?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 19, 2013 at 12:11:38PM -0500, Jed Brown wrote:

> 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.

Try "git branch --merged master" to get a list of branches that have
already been merged.

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]