private function pushToRemote($tag) { try { $this->git->push($this->remote); } catch (\exception $exception) { $this->writeError($exception->getMessage()); $this->git->deleteLocalTag($tag)->resetHardTo('HEAD~2'); return false; } return true; }