← Back to Mission Control

Boarding Other Vessels

8 min read

Git Clone

Mission Phase 21 • Difficulty: Beginner

Downloading Complete Repositories

Cloning creates a complete local copy of a remote repository—all files, all history, all branches.

Basic Clone

git clone https://github.com/username/repository.git

Or with SSH:

git clone git@github.com:username/repository.git

Clone into Specific Directory

git clone https://github.com/user/repo.git my-folder

What Clone Does

Shallow Clone

For large repos, clone only recent history:

git clone --depth 1 https://github.com/user/repo.git

Clone Specific Branch

git clone -b branch-name https://github.com/user/repo.git

After Cloning

cd repository
git status      # See what branch you're on
git remote -v   # Verify origin is set

Contributing to Projects

  1. Clone the repository
  2. Create a feature branch
  3. Make changes and commit
  4. Push your branch
  5. Create pull request on GitHub

Next: Ship Replication

Cloning gives you a copy. Next, learn forking—creating your own version of a project you can modify freely.