code: def aggregate(self):
          
          logger.info('Start aggregation of %s', self.cwd)
          target_dir = self.cwd
  
          is_new = not os.path.exists(target_dir)
          if is_new:
              self.init_repository(target_dir)
  
          self._switch_to_branch(self.target['branch'])
          for r in self.remotes:
              self._set_remote(**r)
          self.fetch()
          merges = self.merges
          if not is_new:
              # reset to the first merge
              origin = merges[0]
              merges = merges[1:]
              self._reset_to(origin["remote"], origin["ref"])
          for merge in merges:
              self._merge(merge)
          self._execute_shell_command_after()
          logger.info('End aggregation of %s', self.cwd)
docs: Aggregate all merges into the target branch
          If the target_dir doesn't exist, create an empty git repo otherwise
          clean it, add all remotes , and merge all merges.