DEV Community

Introduction to git and GitHub

Nirbhay Vashisht on July 22, 2020

Before we start, I want to state that this tutorial is for absolute beginners who want to learn git and GitHub. The tutorial has no specific prere...
Collapse
 
mikel_brierly profile image
mikel brierly

This was fantastic!! I have to admit that it took me waaaaaaay too long to grasp this concept:

"What is the difference between git and GitHub?"
"Git is a command line tool while GitHub is a website"

What an awesome article for beginners and experienced folks alike!

Collapse
 
nirbhayvashisht profile image
Nirbhay Vashisht

Thanks for the feedback Mikel.
Such comments encourages me to work hard on the content ^_^

Collapse
 
ashwinsharmap profile image
Ashwin Sharma P

Good article Nirbhay. 👍
Explained the details so well using memes and analogies. 👏👏
Loved your way of writing.

Collapse
 
nirbhayvashisht profile image
Nirbhay Vashisht

Thanks for the feedback Ashwin😄🙏
I am glad you liked it

Collapse
 
gsin11 profile image
Gurpreet Singh

Nice post Nirbhay, I have a created a cheat sheet for interns. Usually I handover it to them when they join the company.

GitHub logo gsin11 / git-cheat-sheet

GIT commands cheat sheet

GIT Commands Cheat Sheet

Project is about GIT commands

CREATE
Clone an existing repository
  $ git clone ssh://user@domain.com/repo.git
Create a new local repository
  $ git init
LOCAL CHANGES
Changed files in your working directory
  $ git status
Changes to tracked files
  $ git diff
Add all current changes to the next commit
  $ git add .

Add some changes in <file> to the next commit
  $ git add -p <file>

Commit all local changes in tracked files
  $ git commit -a
  $ git init

Commit previously staged changes
  $ git commit

Change the last commit
  $ git commit --amend
COMMIT HISTORY
Show all commits, starting with newest
  $ git log

Show changes over time for a specific file
  $ git log -p <file>

Who changed what and when in <file>
  $ git blame <file>
BRANCHES & TAGS
List all existing branches
  $ git branch -av

Fetch all origin branches on
Collapse
 
nirbhayvashisht profile image
Nirbhay Vashisht

Thank you very much for sharing this resource with us Gurpreet. Much Appreciated :D

Collapse
 
adela1905 profile image
adela1905

What a story, just awesome...

Collapse
 
nirbhayvashisht profile image
Nirbhay Vashisht

Thank you for the feedback :D

Collapse
 
thisismanaswini profile image
Manaswini

Awesome Nirbhay 👏👏 I love the analogies! They explain stuff so much better. I am a fan of the images too😂

Collapse
 
nirbhayvashisht profile image
Nirbhay Vashisht

Thanks Manaswini😄
I am glad you liked it😊

Collapse
 
chriswilkinsoncodes profile image
chris wilkinson

Congrats on submitting your first article! Lots of useful info here. Well done!!

Collapse
 
nirbhayvashisht profile image
Nirbhay Vashisht

Thank you for the feedback! Means a lot to me 😄

Collapse
 
rushijagani profile image
Rushi Jagani

Good job 👍

Collapse
 
nirbhayvashisht profile image
Nirbhay Vashisht

Thanks for the feedback😄

Collapse
 
ozakaran profile image
🆖 Karan Oza

It's very easy and quite good article for the beginners.
Simple and easy way of explainations good use of pics and metaphors👍
I will definitely recommend to my fellow buddies who wants to learn Git and Github✌️

Collapse
 
jrdev_ profile image
Jr. Dev 👨🏾‍💻

Good to see you on here Nirbhay. Nice article 👍

Collapse
 
nirbhayvashisht profile image
Nirbhay Vashisht

Thank You very much for taking your time to read it and giving your feedback. Means a lot to me 😄

Collapse
 
poomansukhani5 profile image
Pooja Mansukhani 💻

Very good article. I like the way you expressed in a very simple way.
🤞🏻😊👏🏻👏🏻

Collapse
 
nirbhayvashisht profile image
Nirbhay Vashisht

Thank you very much for the feedback 😄

Collapse
 
pritkalariya profile image
👨‍💻pritkalariya • Edited

Loved it! And personally it would help me if you make a tutorial on git commands and github work flow too.

Collapse
 
seshego_m profile image
Unapologetic🇿🇦

Hi, it's Thabo here, from South Africa.
I learned a lot about the differences between git and github. Thanks for the tutorial.

Collapse
 
nirbhayvashisht profile image
Nirbhay Vashisht

Thanks for the feedback! I am glad you liked it :D

Collapse
 
arihant416 profile image
Arihant jain

Lol you made this blog damn interesting by those memes ! 💯💯
Amazing article brother

Collapse
 
nirbhayvashisht profile image
Nirbhay Vashisht

Thank You for the feedback ^_^

Collapse
 
choukseykhushbu profile image
khushbu_C

I can't stress how much easy to understand and basic this article is. Really really liked the way you explained it. 👏 Going to use it for sure to teach my juniors.