GIT in a Simple Way

Rishabh Sharma
3 min readJan 27, 2021

--

GIT

GIT is a distributed version control system initially released in 2005. It was written in C and C++ by Linus Torvalds. Version control system is used for tracking changes in any set of files (source code). GIT is very fast and secure version control system that’s why it is most popular and most used. It is an open source project so that anyone can see its code and contribute to it.

GIT Terminology:

· Repository — Each project in GIT referred as repository or repo.

· Commit — stores the current contents of the index in a new commit along with a log message from the user describing the changes.

· Branch — pointer to a commit.

· Modified — Changes made to file since last commit snapshot.

· Staged — Changes marked to be added into next commit.

· HEAD — pointer to the most recent commit on the current branch.

· Merge — joining two or more commit/branch

· Workspace — local copy of GIT repo.

· Remote Repository — secondary copy of a GIT repo, where we push changes for backup and collaboration. (Can use GitHub, GitLab for this)

· Origin — default name for a remote repository.

· Stash — act as a stack, where changes can be stored without committing them.

· Push — save the commits and create a snapshot.

· Pull — pull changes from remote repository to local repository.

Basic Commands of GIT:

* All commands of GIT start with git.

Pros:

· GIT is a distributed version control system that’s why it a local copy of our work on each node (computer). And there is also a centralized server where all team members push their changes.

· GIT is very fast and secure.

· There are many commands one have to remember for git but after sometime it become very simple to use.

· GIT supports both GUI (Graphical user interface) and CLI or terminal.

· GIT supports parallel development and parallel branches.

· GIT can track almost any changes in a file or many files. Even small changes.

· By using GIT, we can create different version of one project (or a file) and jump between those versions. Create branches for different versions, jump between these branches and also merge those branches.

· For documentation and logging of different work/changes there are no better version control than GIT. GIT saves all details of changes, who and when those changes are made, commits details and also make a detailed log file for whole source code.

· GIT is platform independent. (Available for Linux, mac and windows)

Cons:

· GIT has no access control. You cannot lock a file and stop a user from changing a file.

· GIT have many commands and it’s hard to become friendly.

· Because of CLI (by default) it is not user friendly for some people.

· GIT is not ideal for large binary files like a video.

GIT with Learn by Doing Approach:

The best way to learn is “Learn it while doing”. There are many commands in GIT and best way to understand them is that you practice them. Crio.Do have the similar approach for every technology. As I said every they have a learn by doing approach for GIT too. In Crio’s universe it called “GIT byte”. In crio winter of doing GIT byte is a part of stage 1. It’s a free byte, if you miss the opportunity of #CWOD then no worries go to link below and do some learn by doing with free bytes.

Go to the link and after sign in you fill find many free bytes and also paid programs.

https://www.crio.do/

--

--

Rishabh Sharma
Rishabh Sharma

No responses yet