Introduction to Git

Sai Charan Adurthi
3 min readApr 12, 2019

--

There are already plenty of good and concise tutorials and articles on Git.

This article doesn’t teach Git, instead, it aims to create a basic awareness about git and how it works behind the doors to get a deeper understanding of it.

I am a Data Science enthusiast and I feel that every data science practitioner should be aware of what Git is and how it plays a key role in the data science process.

Hence, I am sharing my views on Git and its importance in data science through a series of articles.

Context

Imagine you’re writing a story/report on a topic or a program to simulate a calculator, etc.. using any traditional text editing software like notepad, notepad++, Wordpad, etc..

Now, you can undo and redo any number of times as long as your file is not closed after saving to disk. Once, you save the file and close the file in the editor and reopen, your undo or redo won’t work.

To overcome this usually, we can save versions of our file.

Like, every time we save and close the file we can save it as a different version if there are any changes made when compared to the previous version.

Such as in below image,

A simple calculator program with different versions of code saved manually

Now, if this is what we need to do for a simple project in software development, imagine how complex it would get.

Enter, version control systems.

What is a version control system?

A version control system is a software that helps in managing the changes to the source code of a software, by keeping track of every modification to the code and allowing us to go back and forth in the version history.

Enter Git.

What is Git?

Git is the most popular and widely used version control system. Git is a mature, actively maintained open source project originally developed in 2005 by Linus Torvalds (the creator of the Linux operating system kernel).

Git is a distributed version control system. Because with Git instead of storing our revisions on a central server, we can store them locally and can push copies of them to other servers.

Steps to Install Git

Git can be installed on Windows, Mac, and Linux systems.

On windows, we can install Git using an exe/msi file.

For mac, we use homebrew to do the installation.

For Linux, we use sudo install command to download from repositories.

Refer the below links for,

Installing git:

https://git-scm.com/book/en/v2/Getting-Started-Installing-Git

Getting started with Git:

https://www.atlassian.com/git/tutorials/setting-up-a-repository

A glimpse of git commands:

https://www.atlassian.com/git/tutorials/atlassian-git-cheatsheet

Git vs Github

GitHub is a cloud-based platform built around the Git tool. Git is a tool that developers install locally on their computer, whereas GitHub is an online service that stores code pushed to it from computers running the Git tool.

The key difference between Git and GitHub is that Git is open-source tool developers install locally to manage source code, while GitHub is an online service to which developers who use Git can connect to upload or download resources.

--

--

Sai Charan Adurthi

Tech Head | Fitness Freak 🏋| Gallivanter✈️🏕| #charanthecsguy