November 14th, 2022

Multi-repository Support Released!

Jessie Houghton
Program Manager

As one of our most highly requested features with Developer Community, we are so happy to announce the release of multi-repository support in Visual Studio 2022. Support for multiple repositories means you can have up to 10 active Git repositories at once. This allows you to work with a solution that spans more than one repository, enabling git operations accross several repositories at the same time. For example, in a large web project you may need different repositories to manage work done on the frontend, the API, the database, the documentation, and various libraries and dependencies. Before multi-repository support, you may have needed to open multiple instances of Visual Studio to work between repos, but now you can manage, view, and debug them all with one instance of VS.

Start using multi-repository support by updating your Visual Studio 2022 to version 17.4 or later and opening a solution or folder with projects across several repositories. Check out our sample solution here that spans multiple public GitHub repositories to see how this works!

Are you new to Git, GitHub, and version control?

Start utilizing GitHub in Visual Studio to its full potential by signing up for the GitHub learning series.

Branch Management and Tracking Changes

Multi-repository support extends the capabilities of the Git Changes and Git Repository windows. This means managing your multi-repo scenarios works the same as working with a single repository. You can create your branches across several repositories at once in the extended Branch creation dialog. Branching in a multi-repo scenario

Branching for multi-repo

Then, as you make changes, the Git Changes window tracks your work separated by repository. This allows you to stage and commit as you normally would.

Multiple repository tracking changes

You can use the branch pickers in the status bar and the Git Changes tool window to switch branches. Simply click on the branch you’d like to checkout. Additionally, you can perform inner loop branching operations like merging, rebasing, renaming, deleting, and comparing branches by right clicking on the branch. You can perform more advance repository and branch management operations in the Git Repository Window.

Multi-repository support for branch management from the status bar

Git Repository window multi-repository support

Network Operations

Once you’re ready to commit, the network operations dialog makes it easy to specify the exact branch you’re pushing to and reorder your pushes. This same dialog allows you to exercise more control over other network operations, like Fetch and Pull.

Multi-repository support for push

Repository Settings

Updates to the Git Repository Settings page allows you to specify your options for each repository. For example, you can specify whether to prune remote branches during fetch.

Multi-repository support in settings

Open Folder

Additionally, you can activate multiple repositories from a Folder in addition to from a Solution.

Multi-repository support for repo picker in the status bar

Building with Your Feedback and What’s Next

Users were requesting help dealing with context switching, collaboration and debugging, and organizing their code. We collected feedback that developers were using other Git clients or even multiple instances of VS to apply Git operations in different repos, projects, and solutions. We also heard that many organizations were creating NuGet packages to get internal dependencies that should just be easy to consume from a separate repo. Finally, users needed a better way to manage things like microservices, separate projects, and scripts or pipelines.

We started by scoping our support based on the open solution and expanded the support to folder scenarios. By focusing more broadly than just on submodule support, we could enable quick cross repo debugging and ensure those not using submodules a seamless experience. A complete submodule experience is on the roadmap for us to tackle in the future.

10 Repository Limit

We currently support up to 10 active repositories at once. We are continuously monitoring the performance impact on I/O, CPU, and UI responsiveness, especially as the size of the repositories can have a large effect. Since less than 0.05% of users are exceeding the 10 repositories in preview, we’ll continue to investigate and take feedback to understand how we can deliver a great experience for all scenarios going forward.

 

Let us know what you think

Your feedback has informed our work at every step of developing this feature – thank you! Try out the new multi-repository support and let us know what you think by taking the following quick survey:

Author

Jessie Houghton
Program Manager

Jessie is a Program Manager on the Visual Studio version control team, focusing on Git tooling and GitHub integration in the IDE.

19 comments

Discussion is closed. Login to edit/delete existing comments.

  • Lawrence Thurman · Edited

    I am running 17.4.2, I would love to know how to choose the 10 repositories that are chosen for Git. My solution has about 46 projects in it, and VS just keep choosing the first 10, not very helpful. How do I get to chose the rest of them, even if 10 at a time? I would expect that it would at the very least look for the first ten that have...

    Read more
    • Jessie HoughtonMicrosoft employee Author

      Thanks for your comment, Lawrence. Allowing users to choose the 10 repos that are activated is in our roadmap.

      We’ll look into the issue with the dialog. Thanks for trying out this feature!

  • Dmytro Tsiniavskyi · Edited

    That’s extremely useful feature for me and I was waiting for it more than 2 years but the 10 repository limit almost ruins it entirely. I have projects from 19 repositories in my solution so I still need to monitor them separately outside the visual studio. Is it possible to expect a some sort of a configuration to change or disable this limit in future versions?

  • Ritchie Carroll · Edited

    Excellent feature! It almost solves my productivity issues with our multi-repo project, save that we have more than 10 repos.

    I get the 10 repo upper limit for performance, but at least a setting where we can adjust the limit would be useful – or perhaps just a config to allow “which” of the top 10 repos are active…

  • HW3 howinston 3WH

    —————————
    OneDrive.exe – Application Error
    —————————
    The exception unknown software exception (0xe06d7363) occurred in the application at location 0x00007FF9145DCD29.

    —————————
    OK Cancel
    —————————

    Opening the sample VS project gave this error. I had already another project opened.

    I tried again this time only opening the sample VS project. Then it was good.

    Where can I learn more about the repository icons displayed in Visual Studio ? They are quite confusing.

    • Jessie HoughtonMicrosoft employee Author

      Hi, I would love to point you in the right direction.
      Which icons are you referring to? There are tooltips over icons that are clickable, and different meanings for the icons in the Git Repository window to indicate if a branch is local, remote, being created, etc.

  • Marika Luebbers

    Because of an accident I now have two repositories instead of just one, how can I completely get rid of the unnecessary and unwanted repository? At Git-Repository settings there I can only delete the link to the origin, but I want to completely delete the second repository from my solution.

    • Jessie HoughtonMicrosoft employee Author

      Hi Marika,
      To completely delete the unnecessary and unwanted repository, you’ll want to delete the .git files from that folder.

  • Hank McCord

    The link to the multi-repo sample is missing. It’s just an underlined “here” text.

  • Bartels, Benjamin

    “Since less than 0.05% of users are exceeding the 10 repositories in preview” – we have over 60 projects, how is everybody else handling this? Not one repo per project?

  • Garman, Duane · Edited

    Jessie, I have seen multiple videos on how this works if you have a solution with multiple repos already in it, but how does one create a new solution and then include mutliple repos? I have three API's that are cloned into their own local directories that I'd like to combine together into a single project/solution in VS so that I only have to open one VS instance and not 3, but I cannot...

    Read more
    • Jessie HoughtonMicrosoft employee Author

      Hi Duane,

      Thanks for your question! You can leverage the folder view which works best if the APIs are independent of one another. You can place the local repo directories in the same parent folder and use the "Open a local folder" option from the Visual Studio launch page to open the parent folder. VS will detect and activate each repo, and it will track changes by repo as shown above in the Git Changes window....

      Read more
      • Patrick Getzmann

        Hi Jessie, we already have Solution files in every Repository, so normal workflow was to open multiple instances of VS. Each Solution had already multiple projects, so creating a new Solution and adding all the projects is quite elaborate. Any good way of merging multiple SLN Files?

  • Taqveem Mohammad Khalid

    Excellent, this will really help those moments when you needed two VS open. Microsoft proving they can add value to git.

  • Thiago Alexsander Luiz

    Very nice