Skip to main content
Skip to content

Creating a repository for your project on GitHub

Create a repository on GitHub to store your code, track its history, and build a software project you can share.

In this tutorial, you'll create the repository you'll use throughout this series. You'll build a small software project called stargazers-log. By the end of the journey, you'll plan work, write code, review changes, and deploy your code to a live website.

stargazers-log is a simple website that tracks and displays repositories you have starred. It helps you build a personal catalog of tools and code examples you care about. Starring repositories also helps you bookmark projects for later and show appreciation to maintainers. To find projects worth starring, see Discovering projects on GitHub.

Note

As you follow this series, if you use GitHub Enterprise Cloud with data residency or GitHub Enterprise Server, you will need to substitute references and links to GitHub.com with your enterprise's dedicated URL.

Prerequisites

If you use Enterprise Managed Users or GitHub Enterprise Server, contact your enterprise or site administrator for information about your account on GitHub Enterprise.

What is a repository?

A repository is where you keep code and files for a software project on GitHub. It stores your files, tracks each change as a commit, and gives collaborators a shared place to work. Most software projects—from a single web page to a large application—live in their own repository.

Creating your repository

Follow these steps to create the repository for this series.

  1. On your GitHub Enterprise Server instance, in the upper-right corner of any page, select , then click New repository.

  2. Use the Owner dropdown menu to select your personal account to own the repository.

  3. In the Repository name field, type stargazers-log.

  4. In the Description field, type a short description, such as "A log of the repositories I've starred."

  5. Use the Choose visibility dropdown menu to select Public so you can publish your software project to a live site later in this series.

  6. Select Add README. This gives your repository a starting file and a place to describe your software project.

  7. You do not need to add a .gitignore or license file for this software project, so leave those options unchanged.

  8. Click Create repository.

Finding your way around your repository

After you create your repository, GitHub opens its main page. This page lists your repository's files and displays your README below them.

The tabs under your repository name take you to the areas you'll use later in this series:

  • Code: View and edit your files. This is the main page of your repository.
  • Issues: Plan and track your work.
  • Pull requests: Propose and review changes.
  • Actions: Run automated workflows, such as deploying your website.
  • Settings: Configure your repository and features such as GitHub Pages.

To return to your repository later, click your profile picture in the upper-right corner of any page, click Repositories, then click stargazers-log.

Adding a starter web page

Your software project will grow into a small web page, so add an index.html file to hold its content.

  1. On the main page of your stargazers-log repository, above the list of files, select Add file, then click Create new file.

  2. In the file name field, type index.html.

  3. In the file editor, add the following starter content.

    HTML
    <!DOCTYPE html>
    <html lang="en">
      <head>
        <meta charset="utf-8">
        <title>Stargazers log</title>
      </head>
      <body>
        <h1>Stargazers log</h1>
        <p>A log of the repositories I've starred.</p>
      </body>
    </html>
    
  4. Click Commit changes.

  5. In the dialog that opens, keep the default option to commit directly to the main branch, then click Commit changes.

What you accomplished

TaskOutcome
Created a repositoryYou created stargazers-log to store your software project on GitHub.
Added a READMEYou gave your software project a place to describe itself.
Added a web pageYou created index.html as the starting point for your site.

Next steps

  • Now that your software project has a home, plan the work you want to do. Continue to Planning your work.