Course Content

What is Git/GitHub & Why do we need it? | Git Tutorials #1

What's Up everyone. Today I am going to discuss Git and Github . So today i am going to talk about what is Git?, Why is it around? and What is Github?. So Let’s get started.

Git: So Git is a version control system. Let’s assume I have made an AI desktop assistant. Now I was working on version 1 which has 3 files, f1, f2, and data.csv. After a few days I have changed the code and made version 3 which also has 3 files, but this time f1, f2 file doesn't exist, instead it has f3, f4 and data.csv. So now f1, f2 files are not around. If in the future we get into a situation where we need those files there will be no option, but if we use a version control system like Git then we can go back and see those files and work with it. 

 

Pros of Version Control System:

  1. Easy File Recovery: You can easily recover files from the version control system.
  2. Issue: If more than 1 person is working on a project and the project stops working after someone’s commit then you can easily check who’s commit it was and rollback.
  3. Rollback: You can easily rollback to a previously working state.

History Of Version Control Systems: 

Local Version Control System: So the first version control system made by programmers was a Local Version Control System, which used Database to keep track of files. But the major drawback was all the changes were saved in the computer. So if the computer gets corrupted then all of the data will be gone. 

Pros:

  • You can track files.
  • You can Rollback.

Cons:

  • If the local Computer/ Laptop gets corrupted then all of the data will be lost.

 

Centralised Version Control System: So after Local Version System the programmers made Centralised Version Control System. In the Centralised Version Control System the changes were saved in a server, so there is no chance of losing all the data and the changes due to data corruption. The programmer needs to pull the file from the server, make his changes and then push that modified file to the server. Now there is a chance that if the server gets damaged then the files can be lost forever.

Pros:

  • You can track files.
  • You can Rollback to a specific version of the file.
  • Changes were saved in a server instead of a local computer.

Cons:

  • If somehow the server gets damaged then the files and changes will be gone.

 

Distributed Version Control System: This is almost like the Centralised Version Control System. The only difference is when the programmer pulls the file he gets the complete changes of that project and each programmer has a complete backup of the server. So if the server gets damaged the programmers can fix it easily without losing any files.

 

How was Git Started: In 2002 the programmers who were working for development of Linux started using Bitkeeper VCS as their version control system. But in 2005 Bitkeeper removed their free of charge status from them and asked to pay the Linux Development team a huge amount of money. After this Linus Torvalds, the creator of Linux  started making his own version control system and then he made Git, a free Centralised Version Control System.  And everyone started using Git. 

 

Features of Git:

  • It stores the snapshot not the differences so the only file which is changed will be stored and disk space will be saved.
  • Almost every operation is local. You can work on your local machine and then push those changes to the centralised repository.
  • Git has integrity. Git generates SHA-1 Checksum for each and everychange, so only those who have access can modify files.
  • Git generally adds data. So as you change the versions it stores them.

 

Github: Github is a hosting website which hosts Git repositories. Git is free to use but Github charges for managing those files. There are also alternative websites which host git repositories like BitBucket, Gitlab etc. Among these Github is most popular. 

So that was pretty much it. Thank You for reading. 

Comments(2)

suryakant 3 months, 1 week ago
It was helpful to get the basics of GitHub
maun 2 months ago
You are the reason why i have this skill now :)

Resources

No downloadable resources for this video. If you think you need anything, please post it in the QnA!

Course Announcements

Any Course related announcements will be posted here