GitPushTarget (@NotNull GitRepository repository, @NotNull GitRemote remote, @NotNull String branchName) { GitRemoteBranch existingRemoteBranch = findRemoteBranch(repository, remote, branchName); if (existingRemoteBranch != null) { return new GitPushTarget(existingRemoteBranch, false); } return new GitPushTarget(new GitStandardRemoteBranch(remote, branchName), true); }