How to get started with Git and GitHub? Let’s find out!

In this article, you will learn how to make a git repo, add it to GitHub, and commit code to it. Let’s get started!

Photo by Roman Synkevych 🇺🇦 on Unsplash

GitHub:

Image of the landing page of GitHub
The landing page of GitHub
Landing page of GitHub
Image of the landing page of GitHub
image of New Repository page of GitHub
This is the page where to make a new repository
Page which gives the URL of the repo
This page will provide the URL to be connected with the local repo

Git:

git
Commands which will appear once git is installed
These commands will appear if git is installed
git init
git add README.md
git add .gitignore
git commit -m "This is the message which will be saved with commit"

Connecting Git to GitHub:

git remote add origin https://github.com/<your_username>/<Your repo name>.git
git push origin master

Congratulations:

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Harsh Prateek

Hi, I am Harsh and I write about coding and learning techniques. I am a student myself and would love to tell everyone my secrets for coding and learning.