What does git fetch --prune origin do?

Viewed 1050

I have a local branch which needs to be removed. If I run git fetch --prune origin. It deleted 4 other branches. I would like to know what exactly git fetch --prune origin does?

1 Answers

git fetch --prune origin will remove the branches which you have locally which are stale. Stale branches exist when the branch was deleted on the remote repository, but still exist on your local copy.

Related