How to get a list of repository forks in Bitbucket Server and Data Center

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

The content on this page relates to platforms which are not supported. Consequently, Atlassian Support cannot guarantee providing any support for it. Please be aware that this material is provided for your information only and using it is done so at your own risk.


This article explains how to get a list of repositories that are forks together with the repositories from which they originate.


Bitbucket 8.11, but also applicable to other versions.


The following database query provides a list of repositories that are forks together with repositories from which they originate.

  • First four columns are related to the repository forked from others.
  • Last four columns are related to the original repository that is forked from.

-- list of repositories with forks
        p.project_key project,
        p."name" project_name,
        p.project_type project_private,
        r.slug repo,
        po.project_key fork_of_project,
        po."name" fork_of_project_name,
        po.project_type fork_of_project_private,
        ro.slug fork_of_repo
    from sta_repo_origin sro
    join repository r on = sro.repository_id
    join project p on = r.project_id
    join repository ro on = sro.origin_id
    join project po on = ro.project_id
    order by

Last modified on Aug 24, 2023

Was this helpful?

Provide feedback about this article
Powered by Confluence and Scroll Viewport.