code: private Collection<String> deleteUntrackedLocalBranches(
  			Collection<TrackingRefUpdate> trackingRefUpdates, Git git) {
  		if (CollectionUtils.isEmpty(trackingRefUpdates)) {
  			return Collections.emptyList();
  		}
  
  		Collection<String> branchesToDelete = new ArrayList<>();
  		for (TrackingRefUpdate trackingRefUpdate : trackingRefUpdates) {
  			ReceiveCommand receiveCommand = trackingRefUpdate.asReceiveCommand();
  			if (receiveCommand.getType() == DELETE) {
  				String localRefName = trackingRefUpdate.getLocalName();
  				if (StringUtils.startsWithIgnoreCase(localRefName,
  						LOCAL_BRANCH_REF_PREFIX)) {
  					String localBranchName = localRefName.substring(
  							LOCAL_BRANCH_REF_PREFIX.length(), localRefName.length());
  					branchesToDelete.add(localBranchName);
  				}
  			}
  		}
  
  		if (CollectionUtils.isEmpty(branchesToDelete)) {
  			return Collections.emptyList();
  		}
  
  		try {
  			// make sure that deleted branch not a current one
  			checkout(git, this.defaultLabel);
  			return deleteBranches(git, branchesToDelete);
  		}
  		catch (Exception ex) {
  			String message = format("Failed to delete %s branches.", branchesToDelete);
  			warn(message, ex);
  			return Collections.emptyList();
  		}
  	}
docs: Deletes local branches if corresponding remote branch was removed.
  @param trackingRefUpdates list of tracking ref updates
  @param git git instance
  @return list of deleted branches