Want to copy someone else’s (or your own) repository from GitHub? Here’s how to do it through GitHub Desktop!
Three Ways to Clone
Method 1: From your repository list
For your personal repositories:
- Open GitHub Desktop
- File → Clone Repository (or
Ctrl+Shift+O) - GitHub.com tab
- You’ll see a list of all your repositories
- Select the one you want
- Choose the Local Path (where to save it)
- Clone
✅ In 10-30 seconds the repository will be copied!
Method 2: By URL
For any public or someone else’s repository:
- Find the repository on GitHub.com
- Click the green Code button
- Copy the HTTPS URL (e.g.:
https://github.com/username/repo.git) - In GitHub Desktop: File → Clone Repository
- Go to the URL tab
- Paste the URL
- Choose Local Path
- Clone
Method 3: From the GitHub website (easiest!)
One click:
- On the repository page click Code
- Choose Open with GitHub Desktop
- Confirm in the browser dialog
- GitHub Desktop will open automatically
- Choose a folder → Clone
🎉 Done!
What to Choose: HTTPS or SSH?
GitHub Desktop uses HTTPS by default — and that’s perfect for beginners!
HTTPS:
- ✅ Works out of the box
- ✅ No setup required
- ✅ Works through firewalls
SSH: (for advanced users)
- Requires generating keys
- Settings on GitHub
- Slightly faster
For now, use HTTPS!
After Cloning
Check the result
In GitHub Desktop you’ll see:
- History tab — all commits
- Current Branch — main branch (usually
main) - Fetch origin — button to check for updates
Open the project
In an editor:
- Repository → Open in Visual Studio Code
- Or: Ctrl+Shift+A / Cmd+Shift+A
In file explorer:
- Repository → Show in Explorer (Windows)
- Repository → Show in Finder (macOS)
- Or: Ctrl+Shift+F / Cmd+Shift+F
Update the code
If the author updated the repository:
- Click Fetch origin
- If there are updates, Pull origin will appear
- Click Pull to download the updates
Cloning vs Forking
Clone
What: Just a copy for reading/learning
When:
- Want to study the code
- Run the project locally
- Don’t plan to make changes
Problem: Can’t push (upload your changes)
Fork + Clone
What: A copy IN YOUR account + cloning
When:
- Want to make your own changes
- Create a Pull Request
- Build your own version of the project
Steps:
- On GitHub.com click Fork (top right)
- The repository will be copied to your account
- Now clone YOUR copy through GitHub Desktop
✅ Now you can make commits and push!
Working with Forks
After Fork + Clone:
Original: github.com/author/repo
↓ (Fork)
Your fork: github.com/YOU/repo
↓ (Clone)
Your computer: ~/Projects/repo/
Make changes:
- Edit files
- Make commits in GitHub Desktop
- Push origin — upload to your fork
- On GitHub.com create a Pull Request to the original
Sync with the original:
The author updated the repository and you want those changes?
In the terminal:
# Add the original as upstream
git remote add upstream https://github.com/author/repo.git
# Download updates
git fetch upstream
# Merge into your branch
git merge upstream/main
Or on GitHub.com:
- Open your fork
- If there are updates, you’ll see: “This branch is X commits behind”
- Click Sync fork → Update branch
- In GitHub Desktop: Pull origin
Common Issues
“Authentication failed”
Cause: GitHub Desktop can’t log in.
Fix:
1. File → Options → Accounts
2. Sign out → Sign in again
“Permission denied”
Cause: Repository is private and you don’t have access.
Fix:
- Ask the owner to add you as a collaborator
- Or fork it (if the author allows)
Cloning takes forever
Cause: Large repository or slow internet.
Fix:
- Wait it out (some projects are > 1GB)
- Check your internet speed
- Try again later
“Repository not found”
Cause: Wrong URL or the repository was deleted.
Fix:
1. Check the URL
2. Make sure the repository exists
3. Verify it’s public (or that you have access)
Best Practices
✅ Organize your folders:
~/Documents/GitHub/
├── my-projects/
├── cloned-for-learning/
└── forks/
✅ After cloning:
1. Read README.md
2. Check for package.json / requirements.txt
3. Install dependencies
4. Run the project following the instructions
✅ Don’t commit to a cloned project you don’t own!
- Fork it
- Create your own branch
- Only then commit + push
✅ Update regularly:
- Click Fetch origin
- Pull if there are changes
Cloning is the first step to studying someone else’s code! Good luck! 📦
💬 Comments (0)
No comments yet
Be the first to share your opinion about this article!