How to download git repositories into Ubuntu WSL2 to run it in VS Code?

I have installed Ubuntu WSL2 and have been working on some projects on Visual Studio Code for a while now. But I am unable to fetch the downloaded Git repositories from Windows.

I am expecting if there is a way to open downloaded Git repos in Ubuntu WSL2.

Upvotes: -3

Views: 2235

Answers (3)

Javier Godon
Javier Godon

Reputation: 1

Maybe you can access this repos directly from windows. For example C:\Users\username can be accessed from, let's say Ubuntu wsl2 this way /mnt/c/Users/username. So in theory that should be enough. If you are using visual studio code the plugin remote wsl will help.

Upvotes: 0

whizzx
whizzx

Reputation: 21

In windows open the control panel and from there click power options and from there you will see change advance settings and then there will be a line written "change setting that are currently unavailable ". Then untick the first option (it will include something about PC). I hope it helps.

Upvotes: -1

Monishka Jha
Monishka Jha

Reputation: 11

So, when you want to open any git repo in WSL terminal you need perform following commands in WSL terminal:

    $ git clone repo-link
    $ cd repo-name
    $ code 

After the following command, the cloned repo will open in both WSL terminal and VS code as well.

Upvotes: 0

Related Questions