Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

visual studio code how to change the current git repository

I would like to change my git repository.

I have created another git repository and I would like to connect it to the new one.
I have no idea where I can list all the providers and change it ?

like image 614
dtjmsy Avatar asked Jan 28 '18 07:01

dtjmsy


People also ask

How do I change my GitHub repository in Visual Studio?

To configure Git settings in Visual Studio, choose Settings from the top-level Git menu. Choose Git Global Settings or Git Repository Settings to view and configure global-level or repository-level settings.

How do I change a repository in Visual Studio?

Click on "Settings" (from either the project Home menu or from the top dropdown menu), then select "Git Settings." You will see a Global Setting of "Default Repository Location" (the one you want). Change it and click Update.

How do I switch to another repository?

Navigate to the Project Settings page for that project. On the Configuration tab of the Project Settings page, select the Reset Git Connection button. On the Configure Git page, enter the new Git URL (the Git URL for the repository to which you want to migrate), and then select Continue.


1 Answers

Since the latest VSCode 1.19 version, you can have multi-root folders

That means you can open a new folder (the one with a .git/ subfolder inside) representing your second repository.
VSCode will detect that Git repo, and use Git commands accordingly.

like image 74
VonC Avatar answered Sep 30 '22 08:09

VonC