@Override
    public void onGitRepoPush(final TaskMonitorFactory taskMonitorFactory) {
        // Use the gitRepoDoc saved in the onRead() method, if available
        if (gitRepoDoc != null) {
            final GitRepoDoc doc = onWrite(gitRepoDoc);
            final GitRepoPushDto dto = new GitRepoPushDto(doc, this.getView().getCommitMessage());
            restFactory
                    .create(GIT_REPO_RESOURCE)
                    .method(res -> res.pushToGit(dto))
                    .onSuccess(result -> {
                        // Wipe the commit message
                        this.getView().setCommitMessage("");

                        // Pop up an alert to show what happened
                        if (result.isOk()) {
                            AlertEvent.fireInfo(GitRepoSettingsPresenter.this,
                                    "Push Success",
                                    result.getMessage(),
                                    null);
                        } else {
                            AlertEvent.fireError(GitRepoSettingsPresenter.this,
                                    "Push Failure",
                                    result.getMessage(),
                                    null);
                        }
                    })
                    .taskMonitorFactory(taskMonitorFactory)
                    .exec();
        } else {
            AlertEvent.fireWarn(this, "Git repository information not available", "", null);
        }
    }
Called when Git Push button is pressed.
@param taskMonitorFactory Where the wait icon is displayed.
stroom-core-client/src/main/java/stroom/gitrepo/client/presenter/GitRepoSettingsPresenter.java