Git Working with Remotes Removing Local Copies of Deleted Remote Branches

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

If a remote branch has been deleted, your local repository has to be told to prune the reference to it.

To prune deleted branches from a specific remote:

git fetch [remote-name] --prune

To prune deleted branches from all remotes:

git fetch --all --prune


Got any Git Question?