code: def fetch_commits(local_root, remotes):
      
      # Fetch all known branches.
      command = ['git', 'fetch', 'origin']
      run_command(local_root, command)
  
      # Fetch new branches/tags.
      for sha, name, kind in remotes:
          try:
              run_command(local_root, ['git', 'reflog', sha])
          except CalledProcessError:
              run_command(local_root, command + ['refs/{0}/{1}'.format(kind, name)])
              run_command(local_root, ['git', 'reflog', sha])
docs: Fetch from origin.
  
      :raise CalledProcessError: Unhandled git command failure.
  
      :param str local_root: Local path to git root directory.
      :param iter remotes: Output of list_remote().