Prunes the repository from deleted remote branches using the terminal
Syntax
| git fetch [remote] [-p | --prune] |
| Option | Description |
|---|---|
| remote | The remote to be used (defaults to origin). |
Example
| # prunes the remote repository origin | |
| git fetch --prune | |
| # same as above | |
| git fetch -p | |
| # prunes the remote repository upstream | |
| git fetch upstream --prune | |
| # same as above | |
| git fetch upstream -p |
