code: func (g *gitCmd) Exec(dir string) error {
  	g.Lock()
  	g.dir = dir
  	g.Unlock()
  
  	if g.background {
  		return g.execBackground(dir)
  	}
  	return g.exec(dir)
  }
docs: // Exec executes the command initiated in gitCmd.