Sunday 19 February 2023

How to clone a git or GitHub repository using visual studio ?


 

Hello friends, welcome to my blog. In this tutorial I am going to explain how to clone a git or GitHub repository using visual studio.

  • Open your browser.

  • Once you open your browser then enter the URL www.github.com 

  • Click on sign in then enter your username and password 

  • Once you enter your username and password click on sign in 

  • Once you sign in into your GitHub account here you can see your profile icon

  • Click on the profile icon. 

  • Once you click on the profile icon here you can see the options.

  • Here you can see the option Your repositories.

  • Click on the option Your repositories 

  • Once you click on the option you will be redirected to another page.

  • Here you can see the list of repositories and here is my sample Repository.

  • Click on the repository name demo.

  • Once you click on the repository here in the code section here you can see the my project code which I have uploaded or I have pushed. Now I want to clone this repository using visual studio so here you can see the code option.

  • Click on the code option.

  • Now go to the local Tab and in the local tab here is the Clone option.

  • Click on https once you click on https here is my repository link now here you can see the copy icon so click on the copy icon so in this way we have copied the repository URL.

  • Now minimize the browser and now open your Visual Studio. In Visual studio there is the first option clone Repository.

  • To clone your GitHub repository you can select this option once you select this option here you can see the repository location so in this way you can choose this option clone repository or there is another option.

  • You can click on back then here you can continue without code so once you continue without code here you can see the file option so in the file option you will get the menus like this and here is the first option clone Repository.

  • Click on the Clone repository option so you will get the same window that we have previously seen now paste the URL that we have copied

  • Here you can see the path option so this path is nothing but your local folder.

  • Click on the browse option now select the folder where you want to keep your code so in my case I am creating new folder give a suitable name as per your choice 

  • I am giving a test so I am selecting the folder test then click on select folder so in this way we have entered the repository location and we have given a physical path of the folder.

  • Then here you can see the Clone option so click on the Clone option so once you click on the Clone option here you can see the Clone Repository and the Clone operation is completed 

  • The time it will take depends upon the the size of your code now 

  • You can see the solution file so click on the option and here you can see code, this is the code that I have cloned from repository which is GitHub repository so you can build the code and you can run the code so in this way or we can clone a GitHub repository using visual studio.


No comments:

Post a Comment