🟠Clone the Repository To Your Machine¶
How to copy (clone) a GitHub repository to a local machine (e.g., into the Repos folder)
1. Copy the Web Address (URL) of Your GitHub Repository¶
In your browser, view your GitHub repository. You should see your account name and the repo name in the browser address bar. For example, the URL to this repository (in my account) is https://github.com/denisecase/pro-analytics-01.
Verify you are working with a GitHub repository in YOUR account.
Use CTRL a to select all and CTRL c to copy the URL to your clipboard. On Mac/Linux, use CMD a and CMD c.
2. Git Clone the Repo to Your Local Machine¶
Open a terminal where you keep your GitHub repos (e.g. C:\Repos or ~/Repos).
On Mac/Linux, use the default Terminal (e.g. zsh or bash), on Windows, use PowerShell.
In the terminal, type git clone leave a single space and use CTRL v (or CMD v) to paste the URL to your GitHub repository into the command. Hit Enter or Return to run the command.
IMPORTANT: The command below is just an example - you must use your GitHub account name and your exact repository name for it to work.
git clone https://github.com/youraccount/yourrepo
3. Verify¶
- A new folder (with the repo name) appears in your current directory.
- No error messages about authentication or repository not found.