Remove Origin Branches from Local Cache If you are trying to count your remote origin branches, the local version caches remote branches even if they have been deleted on origin. git fetch --prune The command above will fetch and clean up the local cache of origin's branches!