-it!

Git, what?

Well technically, Git is a distributed version-control system for tracking changes in source code during software development. It is designed for coordinating work among programmers, but it can be used to track changes in any set of files. Its goals include speed, data integrity,and support for distributed, non-linear workflows.
Git was created by Linus Torvalds in 2005 for development of the Linux kernel, with other kernel developers contributing to its initial development.

Download Git

Let's understand it in more convienent way!

Let's Understand it with a plot
SRC
You Searched

Suppose, You googled something very important topic regarding your work. And you came across a perfect set of content, But mistakenly you haven't saved it at that point time and moved on to another task.

QST
You Forgot

After a while, you are trying to remember what content was that you have found on the internet previously? But now you forgot it completely.

HT
Hit the browser history

Fortunately, every browser has a feature of browsing history. So, having that in mind as you hit the browser history section to find out the piece of content.

OPT
Choose the option

Browser history shows you all the searches and activities that you have done till that point of time. Now from that plethora of options you have to filter out the right option that you want to go with.

GTI
Got it

After filtering out the options from the browser history you got the content that you are looking for!

CNL
Conclusion!

In simple language we can say that just like browser history, Git tracks your source code what changes have you done so far, it is kind of a source code history feature. You can find it any changes, whether it is big or small And you can go back and forth to any changes that you have stored in git.

Stages In Git
WD
1.Working Directory

The working directory is simple, your current directory on your system that you are working on.

SA
2.Staging area

The staging area is acting as a bridge between your working directory & local repository, In staging area new files (a.k.a. untracked-files) are added so that these new files further add-up to local repository through commit.

LR
3.Local Repository

Local repository is your working directory in your local machine or personal computer. Where you make changes locally and that is tracked by the git.

RR
4.Remote Repository

A remote repository is a git repository hosted on the Internet or some other network, it is a common repository that all team members use to exchange their changes in the source-code development. It is just cloud storage.

Git Operations
INIT
Initialize

Initialize operation is used to initialize or to create a git repository.

ADD
Add

This operation adds a change in the working directory to the staging area. Basically, it tells git that you have to include the updates to a particular file for the next commit.

CMT
Commit

This operation captures the snapshot of the working directory. So, that it can compare the changes in future commits (Master branch is always headed to last commit).

PULL
Pull

This operation is used to fetch and download content from a remote repository and immediately update the local repository to match that content.

PUSH
Push

This operation is used to upload local repository content to a remote repository. It is opposite of pull Operation.

BRCH
Branch

This operation creates a branch for independent line of development. You can think of them as a way to request a brand new working directory, staging area, And project history for parallels contribution and development (Default branch in git is master branch).

MRG
Merge

This operation lets you take the independent lines of development created by git branch and integrate them into a single branch i.e. to master branch.

RBS
Rebase

This is also a way of combining the work between different branches. Rebasing takes a set of commits, copies them and stores them outside your repository. The advantage of rebasing is that it can be used to make a linear sequence of commits.

Illustration Of Git's Working Flow
Responsive image
Few Basic Git commands

No need to rember all these commands, Just get the cheat sheet!

Download Git Cheat Sheet