code: func (c *Config) Validate() error {
  	for name, r := range c.Remotes {
  		if r.Name != name {
  			return ErrInvalid
  		}
  
  		if err := r.Validate(); err != nil {
  			return err
  		}
  	}
  
  	for name, b := range c.Branches {
  		if b.Name != name {
  			return ErrInvalid
  		}
  
  		if err := b.Validate(); err != nil {
  			return err
  		}
  	}
  
  	return nil
  }
docs: // Validate validates the fields and sets the default values.