How to Create a Repository on GitHub

Now that you have created an account with GitHub, you are ready to create a new repository. This would be a good time to check out our Git guide on using remote repositories. Basically, remote repositories are important for the following reasons:

  • Provides a “hub” for your code
  • Supports collaboration
  • Decentralizes your code to protect against loss

How to Create a Repository at GitHub

While you can create your own repository on your private server, the steps below demonstrate how you can create a repository at GitHub.

  1. Log into GitHub

  2. Under Your repositories click New repository

  3. Fill in the Repository name

  4. Click Create repository

Explanation of Options

While you can create a repository with only a name, there are some other options you can select in advance that may help optimize your repository.

Description The optional description of your repository should be short and sweet. You don’t need too much information here, but it might help to distinguish this repository in a large list.
Public or Private If you have a free, personal account with GitHub then Public is your only choice.
Initialize this repository with a README The README file is a detailed description of the project which can include special instructions, contribution policy, FAQ, and more. If your program requires more detailed documentation, you should consider using the Wiki feature that comes with your repository.
Add .gitignore Various programming languages and operating systems create extraneous files you don’t need to track. GitHub lets you select a programming language and automatically creates a .gitignore files with rules that will ignore those extraneous files. This will keep unwanted files out of your project.
Add a license This option lets you quickly and easily add a popular softare license to your repository. This will help other people know how they are permitted to use your code.

Where to go from here…

Well done on your completion of this tutorial. In the above article we discussed how you can create a remote repository at GitHub as opposed to hosting one of your own. While it’s easy to host your own repository, GitHub has done a lot of the work for you. You may be wondering what the next step might be.

If you have any questions about this article or using Git in general, please leave a comment below.

Leave a Reply