Skip to content

This page was translated from the Korean original with AI and may contain errors.

Chapter 2. Creating a GitHub Repository — Building a Home for Your Project ​

Required Read this to follow this stage.

One-line summary: A repository is where you keep your project files and their entire change history. Creating a repository on GitHub gives you a safe backup outside your computer and a space to collaborate. Your choice between public and private connects directly to whether you can publish your site to the web for free later, so decide from the start.

This chapter is based on the official GitHub documentation checked on November 1, 2026. The GitHub interface is described using the English labels. If you tried saving a "change history" with Git in Stage 3, think of this step as putting that history online.

Git, GitHub, and Repositories ​

Git is a version control system that tracks changes to files.[1] In Stage 3, when you asked Claude to "save a record," that commit was a Git record.

GitHub is a service that puts your Git projects online and adds planning and collaboration tools.[1:1] A repository is the place on GitHub where you keep your project's code and files. It stores your files, records every change as a commit, and gives you a shared space to work together.[2]

Here are some common terms to know ahead of time.

TermMeaning
BranchA separate line of work that does not affect the main version
MergeCombining changes from one branch into another
RemoteA repository stored on GitHub, not on your computer
CloneDownloading a repository—including its full history—to your computer

Source: GitHub official docs (excerpted)[3]

Quick check

What is the relationship between Git and GitHub?

Public vs. Private ​

The very first thing you decide when creating a repository is its visibility.

VisibilityWho can see it
PublicAnyone on the internet
PrivateOnly you and the people you share it with

Source: GitHub official docs[4]

In this guide, you choose Public. That is because this choice connects directly to deployment in Chapter 7. Free accounts can only use GitHub Pages (free web publishing) with public repositories.[5] GitHub's own beginner tutorial also tells you to choose Public for the same reason.[6]

Public repositories come with a trade-off. Because your entire codebase is visible to everyone, there is a higher risk that someone might look for weaknesses or sensitive information.[7] So never put personal information, passwords, or notes containing real names into a public repository. We will cover this in detail in Chapter 9.

What if you switch it to private later? (click to expand)

You can change the visibility later, but there is a catch. On a free account, if you switch a public repository to private, any published Pages site is automatically taken down.[8]

Quick check

How should you set up your repository if you want to publish it on GitHub Pages later with a free account?

README, .gitignore, and License ​

When you create a new repository, you can include three starter files right away.[9]

  • README: The first guide visitors see when they open your repository.[10] It explains what the project does, why it is useful, and how to get started. The tutorial recommends selecting Add README because it gives you a starting file and a place to describe your project.[11]
  • .gitignore: A list that tells Git which files to ignore when you make a commit.[12] You list things that should never be uploaded, like configuration files containing passwords. Keep one important rule in mind: if a file has already been committed, simply adding it to this list will not make Git ignore it.[13] That is why it is best to set it up from the very beginning.
  • License: Tells other people what they can and cannot do with your code. You do not have to pick one.[14] If you don't pick one, default copyright laws apply, so other people cannot copy, distribute, or modify your code.[14:1] For a practice repository, you don't need to pick one.
If you want to pick a license (click to expand)

If you are unsure which to pick, GitHub recommends choosealicense.com. GitHub also notes that this guidance is not legal advice.[15]

When uploading a folder that already has a Git history (click to expand)

When you create a new repository for the first time, as in this guide, you don't need to worry about this.

If you are importing an existing repository that already has a Git history, do not select any of these three options. The files newly created on GitHub and the history in your folder can get out of step. Then Git stops because it doesn't know which side to keep. This is called a merge conflict.[16]

Quick check

Which statement about .gitignore is true?

Connecting to Your Computer ​

Bringing a repository from GitHub onto your computer is called cloning (clone). The cloned copy stays connected to the original on GitHub, so you can upload the changes you record right back to it.[17]

There are a few ways to do this.

MethodBest when
GitHub DesktopYou want a visual screen, just like in the official beginner tutorial
Ask Claude CodeYou want to ask in plain words, just like in Stage 3

Source: Summary from this guide (GitHub Desktop is the method used in the official tutorial)[17:1]

You can ask Claude Code like this. For the repository URL, use the address shown in your browser's address bar when you open the repository on GitHub (for example, https://github.com/your-username/cafe-todo-board).

Clone this GitHub repository into the ~/hello-ai-practice/todo-board folder: <repository URL>

You can also upload an existing folder. A folder already on your computer—like the organizer tool from Stage 3—can also be uploaded to GitHub, and if it was not managed by Git yet, you first turn it into a Git repository.[18] However, in this guide, we will create the to-do board as a brand-new repository. The organizer tool contains your original notes, so it is safer to avoid uploading it directly to a public repository.

Quick check

What happens when you clone a repository to your computer?

Try It Yourself ​

  1. Sign up or log in at github.com (a free account is fine).
  2. Click + in the top right → New repository to create a new repository. Name it cafe-todo-board, set visibility to Public, and select Add README. Add a .gitignore as well if you like (follow the on-screen prompts to choose a template).
  3. On the repository page, check that your README is visible.
  4. Use GitHub Desktop or Claude Code to clone the repository into ~/hello-ai-practice/todo-board. Later, uploading the history on your computer to GitHub is called pushing (push) (covered in Chapter 4). To push, the tool you use must be logged in to your GitHub account. If a login window pops up the first time you upload, follow the prompts.
  5. Open the cloned folder in the Claude Code app and verify that README.md is inside.

Up next: In Chapter 3, you will let Claude interview you about what to build in this repository and organize the plan into SPEC.md.

Summary ​

  • Git is the tool that records changes, GitHub is the place to keep those records online and collaborate, and a repository is your project's home.
  • Free accounts can only use GitHub Pages with public repositories. Never put personal information in a public repository.
  • A README is the guide, .gitignore is the list of files not to upload, and a license grants permission to use your code. Set up .gitignore right from the start.
  • A cloned copy stays connected to GitHub.

Glossary ​

TermOne-line meaning
GitA version control system that tracks changes to files
GitHubA service for hosting Git repositories online and collaborating
READMEThe introductory guide for a repository
.gitignoreA list of files that Git should ignore
CloneDownloading a repository and its full history to your computer

Finished this chapter?

Progress is saved only in this browser. See your progress on the full table of contents.

Next chapter: Chapter 3. Planning and Specification

References (18)
  1. GitHub official docs, "What is GitHub?". "Git is a version control system that tracks changes to files." docs.github.com (checked on 2026-11-01) ↩︎

  2. GitHub official docs, "Creating a repository for your project on GitHub". "It stores your files, tracks each change as a commit, and gives collaborators a shared place to work." docs.github.com (checked on 2026-11-01) ↩︎

  3. GitHub official docs, "About repositories". "Branch | A parallel version of your code that is contained within the repository, but does not affect the primary or main branch." / "Merge | To take the changes from one branch and apply them to another." / "Remote | A repository stored on GitHub, not on your computer." docs.github.com (checked on 2026-11-01) ↩︎

  4. GitHub official docs, "About repositories". "Public repositories are accessible to everyone on the internet." / "Private repositories are only accessible to you, people you explicitly share access with, and, for organization repositories, certain organization members." docs.github.com (checked on 2026-11-01) ↩︎

  5. GitHub official docs, "What is GitHub Pages?". "GitHub Pages is available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server." docs.github.com (checked on 2026-11-01) ↩︎

  6. GitHub official docs, "Creating a repository for your project on GitHub". "Use the Choose visibility dropdown menu to select Public so you can publish your software project to a live site later in this series." docs.github.com (checked on 2026-11-01) ↩︎

  7. GitHub official docs, "About repositories". "Public repositories expose your codebase to everyone, increasing the risk that attackers might exploit vulnerabilities or access sensitive information." docs.github.com (checked on 2026-11-01) ↩︎

  8. GitHub official docs, "Setting repository visibility". "Any published GitHub Pages site will be automatically unpublished." docs.github.com (checked on 2026-11-01) ↩︎

  9. GitHub official docs, "Creating a new repository". "If you're importing an existing repository to GitHub, don't choose any of these options, as you may introduce a merge conflict." docs.github.com (checked on 2026-11-01) ↩︎

  10. GitHub official docs, "About the repository README file". "A README is often the first item a visitor will see when visiting your repository." docs.github.com (checked on 2026-11-01) ↩︎

  11. GitHub official docs, "Creating a repository for your project on GitHub". "Select Add README. This gives your repository a starting file and a place to describe your software project." docs.github.com (checked on 2026-11-01) ↩︎

  12. GitHub official docs, "Ignoring files". "You can create a .gitignore file in your repository's root directory to tell Git which files and directories to ignore when you make a commit." docs.github.com (checked on 2026-11-01) ↩︎

  13. GitHub official docs, "Ignoring files". "If you want to ignore a file that is already checked in, you must untrack the file before you add a rule to ignore it." docs.github.com (checked on 2026-11-01) ↩︎

  14. GitHub official docs, "Licensing a repository". "A software license tells others what they can and can't do with your source code, so it's important to make an informed decision." / "However, without a license, the default copyright laws apply, meaning that you retain all rights to your source code and no one may reproduce, distribute, or create derivative works from your work." docs.github.com (checked on 2026-11-01) ↩︎

  15. GitHub official docs, "Licensing a repository". "We hope it helps, but please keep in mind that we’re not lawyers and that we make mistakes like everyone else." docs.github.com (checked on 2026-11-01) ↩︎

  16. GitHub official docs, "Creating a new repository". "If you're importing an existing repository to GitHub, don't choose any of these options, as you may introduce a merge conflict." docs.github.com (checked on 2026-11-01) ↩︎

  17. GitHub official docs, "Connecting to your code locally". "Cloning creates a copy of your repository on your computer that stays connected to the version on GitHub." docs.github.com (checked on 2026-11-01) ↩︎

  18. GitHub official docs, "Adding locally hosted code to GitHub". "If your locally-hosted code isn't tracked by any VCS, the first step is to initialize a Git repository." docs.github.com (checked on 2026-11-01) ↩︎