Clone a GitHub repository with git clone

Download a full local copy of any Git repository into a new folder on your Windows PC.

WindowsnamingTerminaldeveloperLow risk
Run: git clone https://github.com/user/repo.git — a folder named repo appears with the full project history.

01Command

Command
$ git clone https://github.com/user/repo.git

02What it does

git clone downloads the entire repository — all files plus the complete commit history — into a new subfolder named after the repo. Get the URL from the green Code button on GitHub. To put it in a specific folder instead, append the folder name: git clone https://github.com/user/repo.git my-folder

03Risk

RiskLow risk
RequirementsGit for Windows installed (winget install Git.Git)
!Warning: Private repos require authentication; after a failed login, create a personal access token in GitHub settings (Git for Windows stores it in Windows Credential Manager).

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • git-clone Documentation
    Git · vendor-doc · 2026-09-17
    Evidence: Official Git documentation: git clone clones a repository into a new directory, with the repository URL as the main argument.
  • Cloning a repository
    GitHub Docs · vendor-doc · 2026-09-17
    Evidence: GitHub's guide shows cloning a repository with git clone https://github.com/OWNER/REPO.git on the command line.

Last verified: 2026-09-19 · Category: Developer

06Related solutions