My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more
A Beginners Guide To Git & Github: 3 Easy Steps To Store Your Projects On Github

A Beginners Guide To Git & Github: 3 Easy Steps To Store Your Projects On Github

Damilola Owolabi's photo
Damilola Owolabi
·Jun 2, 2020

This article explains how to get started with git as a beginner. It’s likely that you might have the word “Git” & “Github” before. Don’t get it twisted they ain’t the same thing.

Git is a version control system for tracking changes in source code during software development. It is designed to coordinate work among programmers, but it is used to track changes in any set of files. While Github is literally a platform where developers store their projects and network with like-minded people.

The 3 easy steps to store your projects on Github Having described what “Git” & “Github” means. let’s follow this practical steps to get a better understanding better of how git and github works.

STEP 1: Install Git & Create a Github account

If you don’t have git installed on your computer follow the instructions here to install git. Once you are done with that Signup for a free Github account.

STEP 2: Create a new repository

To get started with this, login to your github account. After a successful login, it automatically redirects you to the dashboard. There you will see a green button named “New”. Click on it to create a new repository, Thereafter;

  • Input a repository name
  • Input the project description (tho it is optional)
  • Lastly click on “Create repository”

STEP 3: Add your files

Open the terminal program on your computer and navigate to the folder where your files are (the files you intend to upload). Then follow this subsequent steps;

- git init
- git add .
- git commit -mfirst commit”
- git remote add origin https://github.com/your-username/repository-name.git
- git push -u origin master

And if you go back to the repository you created earlier you should see your files there.

Yeah, that’s all. You have just created your first github repository. I’m glad you now understand how git and github works.