def push_commit(self):
        # Dictionary to pass along state to advance()
        next_state_kwargs = {}

        branch_mapping = '%s:%s' % (self.__review_branch, self.__remote_branch)
        result, _, stderr = utils.capture_command(
                'git', 'push', self.__remote, branch_mapping,
                expect_success=False)
        if result != 0:
            # TODO(dhermes): Should we try a sync and proceed if no failure?
            next_state_kwargs['error_message'] = stderr
            self.state = self.NOTIFY_FAILURE
        else:
            next_state_kwargs['success'] = True
            self.state = self.CLEAN_UP_LOCAL

        self.advance(**next_state_kwargs)
Pushes the squashed commit to the remote repository.
dataset/ETHPy150Open googlearchive/git-rv/submit.py/SubmitAction.push_commit