Skip to content

Instantly share code, notes, and snippets.

@defo550
Created June 28, 2021 21:58
Show Gist options
  • Save defo550/001bf738d96f7d31c4573ad8b0844ef4 to your computer and use it in GitHub Desktop.
Save defo550/001bf738d96f7d31c4573ad8b0844ef4 to your computer and use it in GitHub Desktop.
Useful git commands

Using Prune on Remote Repository

The easiest way to use prune is to provide it as an option when fetching:

git fetch --prune origin

Peform a prune and not fetch on the remote repository:

git remote prune origin

Configure Git to have prune executed with every fetch operation:

git config --global fetch.prune true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment