Open In App

Creating Repository in GitHub

Last Updated : 13 May, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

In this article, we will learn how to publish or upload projects to our GitHub account. This article will give you very detailed information about what is GitHub and how to set up a GitHub account. We will cover a brief introduction to GitHub and then we will step by step about How to create and manage a repository in our GitHub account.

What are Git and GitHub?

Git is an open-source version control system. It means that whenever a developer develops some project (like an app) or something, he/she constantly updates it catering to the demands of users, technology and whatever it may be. Version control systems keep these revisions straight, storing the modifications in a central repository.

GitHub is a web-based version control system and collaboration platform for developers. It is the centre around which all things involving git revolve.

Relation between Git and GitHub

There is a common misconception that Git and GitHub are the same. Git is used to store the source code for a project and track the complete history of all changes to that code, while GitHub is a cloud-based platform built around the Git tool. The major difference is that Git is software that a developer can locally install on a machine to manage source code while GitHub is an online service to which developers who use Git can connect and upload or download resources. GitHub is a hosting service for git repositories.

Below are the sample project files which we want to upload:

Steps to Create the Repository

Step 1: After successfully setting up GitHub account login to your account. You will see the screen as below.

Step 2: Click on the new repository option.

Step 3: After clicking new repository option, we will have to initialize some things like, naming our project, choosing the visibility etc. After performing these steps click Create Repository button.

Step 4: After clicking the button, we will be directed to below page. Right now the only file we have is a readme file.

Step 5: Now click on the “Upload files” button.

Step 6: Follow the steps mentioned in the Picture below and click “commit changes”

step 7: Now you will see that all of our files uploaded in our github

Hosting GitHub repository:

GitHub Pages are designed to host your personal, organization, or project pages from a GitHub repository. As we already have the repository, we only have to activate our pages.

Step 1: Go to settings and scroll down to github pages section. Change disable option to master branch option. Now github will do some behind the scenes work and going to publish the repository. Step 2: Now we are done and our project can be accessed worldwide.


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads