Fork and Clone

The Big Idea

Forking creates your own copy of someone else's repo on GitHub. Cloning downloads it to your computer. Together, fork + clone is how you get your own working copy of a shared project. You will use this to set up your reflections repo — where all your written reflections will live for the rest of Foundations.


Your Roadmap

SectionTimeRequired?
Fork vs clone — what's the difference?5 min⚑ Required
Step 1: Fork the reflections repo5 min⚑ Required
Step 2: Clone it to your computer10 min⚑ Required
Step 3: Open in VS Code5 min⚑ Required
Step 4: Add your previous reflections20 min⚑ Required
Reflect15 min⚑ Required

Fork vs clone — what's the difference?

Show explanation

Clone — copies a repo from GitHub to your computer. Your local clone is connected to the original remote and is meant to stay in sync with it.

Fork — creates your own copy of someone else's repo on GitHub. Your fork is independent. It does not feed back into the original unless you deliberately open a pull request.

CloneFork
Where it livesYour computerYour GitHub account
Connected to original?YesNo (unless you choose to)
Use caseWorking on a shared projectTaking your own copy of someone else's project

At Dev Academy you will fork the reflections repo so your reflections stay on your own account and do not affect the original.


Step 1: Fork the reflections repo

  1. Go to the dev-academy-foundations/reflections repo on GitHub
  2. Click Fork in the top right corner
  3. Select your own account as the destination

Your forked repo will now live at https://github.com/YOUR-USERNAME/reflections.

Figure 1: Fork the repo from the original

Fork GitHub Repo

Figure 2: Your forked repo on your account

View Forked GitHub Repo

Step 2: Clone it to your computer

Important: Clone this into your Dev-Academy parent folder — not inside an existing Git repo.

  1. On your forked repo page on GitHub, click the Code button and copy the SSH URL
  2. In your terminal, navigate to your Dev-Academy folder
  3. Run:
git clone git@github.com:YOUR-USERNAME/reflections.git
cd reflections

Figure 3: Cloning in the terminal

GitHub terminal clone commands

Step 3: Open in VS Code

code .

You should see a folder for each sprint, with a my-reflections markdown file inside each one.

Figure 4: The cloned repo open in VS Code

Local repo in VS Code

Step 4: Add your previous reflections

Open sprint-1/my-reflections-sprint-1.md. Copy and paste the reflections you wrote in earlier tasks into this file under the matching headings.

Use Markdown formatting to make headings and bold text.

When you are done, stage, commit, and push:

git add -A
git commit -m "Add sprint 1 reflections"
git push

From now on, you will add all your reflections directly to this repo and push them to GitHub.


How to know you've nailed it

LevelYou can...
🪨Intro ClimbFork the repo and clone it to your computer⚑ Required
🧗Core AscentAdd your previous reflections and push the changes to GitHub⚑ Required
🏔️SummitExplain the difference between fork and clone without notes◎ Optional

Reflect

Open sprint-1/my-reflections-sprint-1.md and add your answers under the GitHub Fork & Clone heading.

Stage, commit, and push your reflection.

git add -A
git commit -m "Add GitHub Fork and Clone reflection"
git push

The Big Idea (revisited)

Fork to get your own copy on GitHub. Clone to get it on your computer. From here, every reflection you write goes into this repo and gets pushed to GitHub.


Extra Resources