Github Logo

Whether you're starting a completely new software project or wanting to take a "Docs as Code" arroyo with your documentation on GitHub, one of the showtime steps is creating a repository (repo). Here's how it's done.

Why Create a GitHub Repo?

Git is an open up-source distributed revision control organization that allows multiple developers (and writers!) to constantly and consecutively make and track changes to code or documentation in a centralized location without overriding someone else's piece of work. This version control makes it so that if something breaks, yous can hands chase down the source of the problem and revert back to a working version earlier the problematic code is pushed.

It's also good for tracking who contributed to what and when. This is especially of import when multiple people from dissimilar time zones are contributing to 1 project.

RELATED: What Is GitHub, and What Is Information technology Used For?

By creating a GitHub repo, you lot bring these benefits to your projection. Additionally, if you allow your repo to exist open to the public, others can contribute—whether that involves fixing broken code or fifty-fifty making corrections to typos. You may even be able to release a working beta version alee of schedule. Open source is a beautiful thing.

How to Create a GitHub Repo

To set up up a project on GitHub, y'all'll demand to create a repo. To do then, log in to (or create) your GitHub account. Once logged in, click the "+" icon on the right side of the header bill of fare (which is attainable from anywhere on the site). Select "New Repository" in the drop-down menu that appears.

New repository option in Github menu

Yous'll at present exist on the "Create a New Repository" page. Cull the possessor of the repo and give it a short, memorable name. Go on in mind that the name of the repo needs to be URL-friendly. While there is no strict convention, the near popular style is to use all lowercase letters while separating words with a hyphen, such as example-repo-proper name. If you apply spaces in the name, a hyphen will be added in its place.

Once you lot've named your repo, requite information technology a brief description and choose whether y'all want to brand the repo public or private.

Create repo name and description

Side by side, you can:

  • Add a README file: Innovate and explain how to use and contribute to your project.
  • Add together .gitignore: Choose which files to ignore.
  • Choose a license: Let others know what they can and can't practice with your project's code.

These are optional just highly recommended to add together. When you're ready, click "Create Repository."

Create repository button

Your repo is at present created.


Once y'all've created a repo, you can clone information technology to your local machine, which allows you to make edits to the content locally rather than straight to the source files in the repo.

RELATED: How to Clone a GitHub Repository