[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Pruning dead branches
From: |
Phil Sainty |
Subject: |
Re: Pruning dead branches |
Date: |
Mon, 24 Jan 2022 19:04:50 +1300 |
User-agent: |
Orcon Webmail |
Anyone wanting to have the remote deletions reflected
in their local working copies will need to tell git to
prune those references locally.
Assuming your upstream remote is named "origin", this
will show you what would be deleted locally:
git fetch --dry-run --prune origin
(Repeat without "--dry-run" to actually do it.)
There's also a --prune-tags option (which must be used
in conjunction with --prune).
Do check the --dry-run first, and see the git-fetch man
page for details, as the pruning feature might not work
the way you expect (especially wrt tags, and/or if you
have multiple remotes configured for the repository).