GITHUB / LESSON 04
Your First Repository.
Creating and managing your first repo

Loading the lesson…
Loading activities…
GITHUB / LESSON 04
Creating and managing your first repo

Loading the lesson…
Loading activities…
Your GitHub account is all set up, so let's make your very first project. On GitHub a project is called a "repository" (or "repo" for short). Let's build one!
A repository is just a folder that Git keeps track of. Inside you'll find a few things.
Think of it as a regular folder on your computer... with superpowers. Git watches everything that happens in that folder and keeps a record of every single change.
We'll make your first repo right on GitHub, then pull it down to your computer.
Open github.com and make sure you're signed in.
Click the green "New" button near "Repositories" on the left, or click the "+" in the top-right corner and pick "New repository."
Give your repository a name. For this exercise, let's call it my-first-repo.
Naming tips
Write a quick description of what this project is, something like "My first GitHub repository for learning Git."
Pick who gets to see your repo.
For learning, either one is totally fine!
Turn on the option to add a README file (depending on how GitHub has the page laid out that week, it's a checkbox or a toggle). That creates a starting file for your project.
Click the green "Create repository" button.
Your repository lives on GitHub now, but you need a copy on your computer to actually work on it. Grabbing that copy is called "cloning."
On your repository page, click the green "Code" button.
Make sure "SSH" is selected (NOT HTTPS), then click the clipboard icon to copy the URL.
It should look something like git@github.com:yourusername/my-first-repo.git
Open up your terminal app.
Pick where you want your project to live. For example, this.
No Projects folder yet? Make one.
Run the clone command with your URL.
Swap "yourusername" for your actual GitHub username (copy-pasting it as-is is a classic first-timer move, no shame).
And now you've got a complete copy of your repository on your computer!
When you cloned the repository, Git did a handful of things for you.
my-first-repoLet's peek at what's inside your new repository.
You should see two things.
README.md - The file GitHub made for you.git - A hidden folder where Git keeps all its tracking dataNever hand-edit the .git folder! Git manages it on its own, and poking at it is a fast way to ruin your afternoon.
Open the README.md file and see what's in there.
You'll see your repository name as a heading. This file uses Markdown, which is a simple way to format text. We'll get into Markdown more later.
"Permission denied (publickey)" error
"Repository not found" error
Cloned but can't find the folder
ls to list folders and cd to move aroundYou've got a repository on GitHub AND on your computer. Now it's time to learn how to make changes and save them. Next lesson covers the basic Git workflow of add, commit and push...