Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-2796

Possibility to move a git repository from one project to another

    • Icon: Suggestion Suggestion
    • Resolution: Fixed
    • 2.8.0
    • Repositories
    • None
    • We collect Bitbucket feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      It would be really a great feature to stash if customers could easily move a repository from one project to another by using the web GUI.

          Form Name

            [BSERV-2796] Possibility to move a git repository from one project to another

            Jerry Qassar added a comment - - edited

            Hello,

            For those people asking when this will be implemented: This capability has existed for years_,_ which is why the issue is closed.  Go to the repository settings (as an admin user) and click Move Repository at the top right.

             

            It also works with large numbers of projects in a server/DC instance; if you don't see your project right away, the project drop-down autocompletes and paginates with current versions of Bitbucket.  Note that you must be an admin for both the source repository and the target project in order to be able to move a repository to another project.

            Jerry Qassar added a comment - - edited Hello, For those people asking when this will be implemented: This capability has existed for years_,_ which is why the issue is closed.  Go to the repository settings (as an admin user) and click Move Repository at the top right.   It also works with large numbers of projects in a server/DC instance; if you don't see your project right away, the project drop-down autocompletes and paginates with current versions of Bitbucket.  Note that you must be an admin for both the source repository and the target  project in order to be able to move a repository to another project.

            @bturner,

            the project list is limited to 10 in a drop-down menu under project settings, when a company has 50+ projects, it's not possible to move to a desired one. 

            And apparently your "support portal is currently down", so not able to create a new ticket.

            Deleted Account (Inactive) added a comment - - edited @bturner, the project list is limited to 10 in a drop-down menu under project settings, when a company has 50+ projects, it's not possible to move to a desired one.  And apparently your "support portal is currently down", so not able to create a new ticket.

            3be5efe8ebb1,

            Thanks for the vote, but...why? It's already shipped. If you just want to move a repository from one project to another, it's already possible and has been for almost 7 years. Is there something specific you're trying to do that's not possible?

            Best regards,
            Bryan Turner
            Atlassian Bitbucket

            Bryan Turner (Inactive) added a comment - 3be5efe8ebb1 , Thanks for the vote, but...why? It's already shipped. If you just want to move a repository from one project to another, it's already possible and has been for almost 7 years. Is there something specific you're trying to do that's not possible? Best regards, Bryan Turner Atlassian Bitbucket

            leavittx added a comment -

            Voting for this

            leavittx added a comment - Voting for this

            m.ajmal, 5f24407fb8eb,

            I'm a little puzzled by the question. Yes, it's possible. It's been possible since Stash 2.8, released September 2013. The release notes for 2.8 include details on how to do it. In short:

            • Repository admins can visit a repository's settings page, where a "Move repository" button will be shown
            • Clicking the "Move repository" button will display a list of projects the user has project admin for
              • If the user does not have project admin permissions, they will not be able to move the repository
            • The user can select any project they have admin permissions for to move the repository there
            • The system will create an "alias" in the database that will allow the repository's old hosting URLs to still work, until/unless another repository is created that would use those URLs

            One thing the UI still does not support is moving repositories from a project or a personal project (i.e. a user's account) to a personal project. The REST API does support this operation, if the requesting user has repository admin rights for the repository and project admin rights for the target personal project.

            Best regards,
            Bryan Turner
            Atlassian Bitbucket

            Bryan Turner (Inactive) added a comment - m.ajmal , 5f24407fb8eb , I'm a little puzzled by the question. Yes, it's possible. It's been possible since Stash 2.8, released September 2013. The release notes for 2.8 include details on how to do it. In short: Repository admins can visit a repository's settings page, where a "Move repository" button will be shown Clicking the "Move repository" button will display a list of projects the user has project admin for If the user does not have project admin permissions, they will not be able to move the repository The user can select any project they have admin permissions for to move the repository there The system will create an "alias" in the database that will allow the repository's old hosting URLs to still work, until/unless another repository is created that would use those URLs One thing the UI still does not support is moving repositories from a project or a personal project (i.e. a user's account) to a personal project. The REST API does support this operation, if the requesting user has repository admin rights for the repository and project admin rights for the target personal project. Best regards, Bryan Turner Atlassian Bitbucket

            Please let us know, Is it possible to move repos from one project to another!!! 

            varuninnomate added a comment - Please let us know, Is it possible to move repos from one project to another!!! 

            Now in 2020, can we move repos from one project to another in Bitbucket?  Trust me, it wasn't me, but Covid19 pushed me to raise this question. 

            Muhammad Ajmal added a comment - Now in 2020, can we move repos from one project to another in Bitbucket?  Trust me, it wasn't me, but Covid19 pushed me to raise this question. 

            Currently, you can only move a repository to a normal project via the UI. You should be able to move the repository to another user via our REST API.

            jhinch (Atlassian) added a comment - Currently, you can only move a repository to a normal project via the UI. You should be able to move the repository to another user via our REST API.

            I have been using this feature to move repositories from users to projects and from project to other projects, but today I had the request to move repository from a departed user to another user, but it doesn't look like that is supported. Should I file a new ticket for this edge case?

            Benjamin Meyer added a comment - I have been using this feature to move repositories from users to projects and from project to other projects, but today I had the request to move repository from a departed user to another user, but it doesn't look like that is supported. Should I file a new ticket for this edge case?

            jhinch (Atlassian) added a comment - - edited

            Yes. The repository with all its metadata (pull requests, permissions, etc) remains intact.

            jhinch (Atlassian) added a comment - - edited Yes. The repository with all its metadata (pull requests, permissions, etc) remains intact.

              Unassigned Unassigned
              ldemacedo Leonardo De Macedo [Atlassian]
              Votes:
              68 Vote for this issue
              Watchers:
              49 Start watching this issue

                Created:
                Updated:
                Resolved: