Tutorial: how to create a repository in Github

GitHub is an extraordinarily powerful online source code management (SCM) system and version control platform.
It provides a system where users can store their project and collaborate on them with colleagues; working together without any danger of their changes being overwritten or deleted. Just because it is powerful, however, doesn’t mean it needs to be complex and you can soon get started on your first project by creating a repository.

What is a git repository?

The repository is simply the space that is used to store your project. If you are creating your first repository, then you are probably new to GitHub, so you will need to open an account. You can do that now.

Simply navigate to the plans & pricing page on GitHub. There are a number of plans available. A free plan will give you unlimited public repositories and unlimited members to work on them. If you need private repositories, there are a number of different paid options. Let’s just select a free plan for now. You can upgrade at any time.

Just click on the ‘sign up now‘ button and enter your desired username, email address and password on the screen that follows.
Select the free account type and click finish sign up.
You are all set now to create your first git repository.

Creating your first repository in Github

Navigate to the top right of any page and click the ‘+’ icon.

create_repo_menu

Now click ‘New repository‘.
Decide on and enter a short, preferably memorable, name for the repository.
You then have the option of entering a description for the repository.
This is not mandatory but may come be useful later when you have lots of repositories. You need to choose between a public or private repository.
A public repository is visible to all GitHub users and allows you to benefit from this informed community.
A private repository is only visible to you and your chosen collaborators.
For now, you’ll be limited to a public repository.

repo_creation

Now you should select the option to ‘Initialize repository with a README‘.

Now click on ‘Create repository‘.
You have just created your first repository on GitHub.

Committing your first change

The ‘commit‘ command allows you to save a version of your project at any time. When you created this first repository, you also created a README file, which is the ideal place to add information about your project or publish documentation on the project. These README file contents will be shown automatically on the front page of your new repository.
In the list of repository files, click on README.md.

empty_repo

Now click on ‘Edit‘ above the file contents.
In code view, enter some information about the project or yourself.

Now click on ‘Preview‘.
Have a look at the changes you have made to the README file.
Your new content is shown in green. Now look at the bottom of the page.
In the ‘Commit changes’ section, enter some useful ‘commit message’ to describe the changes you have made to the project.

Now click on ‘Commit changes‘.
That’s it: you’re done!

You have created your first repository, added and updated the README file and completed your first commit.