Patricio Treviño

Patricio Treviño

Husband . Father . Developer

Prunes the repository from deleted remote branches using the terminal

Syntax

git fetch [remote] [-p | --prune]
view raw syntax.text hosted with ❤ by GitHub

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
view raw example.sh hosted with ❤ by GitHub

References

git-fetch