What is git and how does it work?

Karikevinod
2 min readJun 15, 2020

If you’re reading this, the word git may not be unfamiliar to you. Recently anyone who works with technology will be somehow used git. Git is one of the version control system and most popular one in recent times because of the advantages over other systems.

Git is a source management system. It keeps track of the files you create, edit or change. You can create versions in it. And it’s a decentralised system — means, everyone could have different version of the same project. [Let’s dig deep.]

Credit

Git is developed by Linus Torvalds (Yeah, creator of Linux) in 2005. This was initially created for managing the kernel source code. Currently it’s maintained by Junio Hamano. It’s free, open-source and licensed under GNU-Public. It’s currently widely used system.

Git handles content in snapshots, one for each commit. Each commit will be saved with a hash id. The logic is written as how to apply or roll back the changes or go into a specific commits.

git init — this is the command to initialise a git repository.

Once you initialise a repository, whatever files/folder you create, edit or delete will be saved as snapshots. If you want to revert or apply, you can do this based on commit hash.

Git manages, a original copy and a working copy. Whenever you make changes to a file or folder, that’ll be a working copy. You can always compare the working copy with original copy by using command git status

I’ll publish a new article stating all the base git commands and it’s uses.

--

--

Karikevinod

Start-up and tech enthusiast. I write about Tech, Devops and anything related.