code: func (s *Store) delete(ctx context.Context, name string, recurse bool) error {
  	path := s.passfile(name)
  
  	if recurse {
  		if err := s.deleteRecurse(ctx, name, path); err != nil {
  			return err
  		}
  	}
  	if err := s.deleteSingle(ctx, path); err != nil {
  		if !recurse {
  			return err
  		}
  	}
  
  	if !ctxutil.IsGitCommit(ctx) {
  		return nil
  	}
  
  	if err := s.rcs.Commit(ctx, fmt.Sprintf("Remove %s from store.", name)); err != nil {
  		if errors.Cause(err) == store.ErrGitNotInit {
  			return nil
  		}
  		return errors.Wrapf(err, "failed to commit changes to git")
  	}
  
  	// abort if auto sync is not set
  	if !IsAutoSync(ctx) {
  		return nil
  	}
  
  	if err := s.rcs.Push(ctx, "", ""); err != nil {
  		if errors.Cause(err) == store.ErrGitNotInit || errors.Cause(err) == store.ErrGitNoRemote {
  			return nil
  		}
  		return errors.Wrapf(err, "failed to push change to git remote")
  	}
  
  	return nil
  }
docs: // delete will either delete one file or an directory tree depending on the
  // recurse flag