Tag: Git

  • Azure DevOps – Move a Git repo between projects

    Azure DevOps – Move a Git repo between projects

    There are many situations where you want to make a copy of a repository…

    • You’ve been working on a personal repo and want to share it with work
    • You’re contributing to an open source project and need to fork
    • You’ve been working on a repo that you want to hand-over to a customer

    It’s the last situation that I need to fulfill and the steps are as follows.

    In the source repo;

    1. Create a personal access token (don’t forget to copy it)
    2. Copy the source repo URL

    In the destination repo;

    1. Select Repos
    2. Select the drop down the repo list
    3. Select Import repository
    1. Clone URL = source repo URL
    2. Select the Requires authorization check-box
    3. Username = username of the personal access token created above
    4. Password = generated password of the personal access token created above
    5. Name = name of the destination repo (if different)
    6. Click import

    Once the process is complete you’ll receive an on-screen and email notification.

  • Azure DevOps – Multiple repos in a single project

    Azure DevOps – Multiple repos in a single project

    When you create a new DevOps project, you only get one Git repo. It is possible to create more repos within the project, but not immediately obvious how. There are a couple of options;

    Navigate to Repos, hit the drop down and select Manage repositories

    Or…

    Open the project and go to Project settings| Repositories | New Repository

    Permissions

    You will need CreateRepository permissions to complete this.