How to clone a GitHub repository using terminal
Create a GitHub account at https://github.com/.
Install VSCode. https://code.visualstudio.com/download
Install the most recent version of Git. https://git-scm.com/downloads
During installation, you will be asked to choose a credential helper. Select “Git Credential Manager Core.”
Clone the repo
Navigate to the main page of the repo you want to clone.
Under the green dropdown “Code,” select the HTTPS tab and copy the link provided.
Open your desktop files. Create a new directory (folder) somewhere you can find easily. Name the directory “GitHub/VSCode Projects” or similar.
Clone the repo in a terminal.
Open your terminal.
You will probably see something like this. (I use Windows Powershell, and my user is “ruoha”.)
Navigate to your “GitHub/VSCode Projects” directory. For first-time terminal navigators, see this page for more information. (Note: For non-Windows users, please find instructions by searching “your-terminal-name” + “directory navigation”)
Now, type “git clone” and a space.
Paste the HTTPS link from the repo, and press “enter.”
You’ll see the terminal say, “Cloning into ‘repo-name’...” and some statements with “done” at the end. This means a successful clone. (Note: The terminal might prompt you to sign in again to GitHub)
If you encounter any error messages or unexpected statements, make sure you have followed all steps prior.
Open the code.
In the terminal, navigate to “VSCode Projects”.
“cd” into the cloned repo directory.
Now that you’re in the repo’s folder, type “code”, space, “.”
Wait a few seconds, and the code will open on VSCode.
Comments
Post a Comment