Introducing GitHub Repositories: Setting Up a Repository

A GitHub repository is a folder with all the files needed for your project, including the files that track all the versions of your project so that you can revert back if you make a mistake. A repository on GitHub also tracks who can collabo­rate and how.

To get a better understanding of what a repository is and how it is structured, you need to create your first GitHub repo:

  1. Go to the home page of GitHub.com by clicking the Octocat.

A list of your repositories appears on the bottom left side of the screen.

  1. Click the green New Repository button.

The Create a New Repository dialog page, shown in Figure 3-1, opens.

  1. Type the name of your repository in the Repository name text box.

I named my repository HelloWorld.

  1. Type a short description in the Description text box.
  2. Select the Public radio button.
  3. Click the Initialize this repository with a README check box.

You do not need to add a .gitignore.

  1. Choose a license from the Add a license drop-down list.

If you’re interested in finding out more information about licenses, see the nearby “Software licenses” sidebar.

  1. Click Create Repository.

The home page of your repository appears. It should look similar to the one I created, which is shown in Figure 3-2. Notice that a markdown file — README.md — is already in the repository. Markdown is a lightweight markup language used to style the words that you write with a plain text syntax. You can make words bold, turn them into headers, and even create a table for data.

In Chapters 4 and 5, you can create a website for yourself. This website can link back to your repository.

Source: Guthals Sarah, Haack Phil (2019), GitHub for Dummies, Wiley.

Leave a Reply

Your email address will not be published. Required fields are marked *