code: func (w *Worktree) Move(from, to string) (plumbing.Hash, error) {
  	// TODO(mcuadros): support directories and/or implement support for glob
  	if _, err := w.Filesystem.Lstat(from); err != nil {
  		return plumbing.ZeroHash, err
  	}
  
  	if _, err := w.Filesystem.Lstat(to); err == nil {
  		return plumbing.ZeroHash, ErrDestinationExists
  	}
  
  	idx, err := w.r.Storer.Index()
  	if err != nil {
  		return plumbing.ZeroHash, err
  	}
  
  	hash, err := w.deleteFromIndex(idx, from)
  	if err != nil {
  		return plumbing.ZeroHash, err
  	}
  
  	if err := w.Filesystem.Rename(from, to); err != nil {
  		return hash, err
  	}
  
  	if err := w.addOrUpdateFileToIndex(idx, to, hash); err != nil {
  		return hash, err
  	}
  
  	return hash, w.r.Storer.SetIndex(idx)
  }
docs: // Move moves or rename a file in the worktree and the index, directories are
  // not supported.