@Override
  public @Nullable GitPushSource getSource(@NotNull GitRepository repository) {
    GitLocalBranch currentBranch = repository.getCurrentBranch();
    if (currentBranch != null) return GitPushSource.create(currentBranch);

    String currentRevision = repository.getCurrentRevision();
    if (currentRevision != null) return GitPushSource.createDetached(currentRevision);

    return null;
  }
@Override
  public @Nullable GitPushSource getSource(@NotNull GitRepository repository)