GitHub Repository

A repository is a location or container where we can store our code. A GitHub repository is referred to as a location on GitHub.com for storing our code. We can create unlimited repositories on GitHub with some size limitations. A repository should ideally be less than 1GB and strictly below 5GB. A single file is limited to 100MB. Read more about repository limits.open in new window

Creating a Repository on GitHub

Creating a repository on GitHub is a fairly straightforward process, there are just a few options you need to know.

To create a repository on Github, log into GitHub, and select New repository from the + icon in the top right side of the navigation. Or go to https://github.com/newopen in new window.

New Repository


github-create-repo

Repository name: choose a name that suits your project. Follow the naming conventions for the files and folders (all lowercase, no spaces, no special characters except for dashes or underscores). The name must be unique for the repository you own.

Description: Adding a description is optional, but encouraged. Describe the project in few words. This will become part of your README.md file.

Public or Private Public repositories are visible to the public, while private repositories can only be seen by you.

Public repositories are useful when you are working on a project that just needs to be shared with your team.

You can create unlimited public or private repositories.

Note

We will use public repositories for this course. As I need to publish them as GitHub websites.

Next, you can choose whether or not to automatically add a README file to the repository. Since we are creating a new empty repository, we are going to check on the README.md file.

We are not adding the following two files:

  • .gitignore allows us to ignore tracking any files or folders in our repository by git version control, simply by adding the name of the files and folders in the gitignore file.
  • license allows us to specify the licensing on the repository. There are many licenses available. Read about licenses hereopen in new window.

Important

If there is a local repository that needs to be connected to GitHub, do not add README.md, .gitignore or license files as they could conflict with your local files.

Finally, click Create Repository.

When it is done, you will be redirected to the repository page.

Under Code button, you can copy the URL for the repository, to clone it to your computer.

github-create-repo