DEV Community

Cover image for Git Explained by a dump person
Ridha Majid
Ridha Majid

Posted on

Git Explained by a dump person

What is Git?

According to Wikipedia, Git is a distributed version control system that tracks changes in any set of computer files, usually used for coordinating work among programmers collaboratively developing source code during software development. Its goals include speed, data integrity, and support for distributed, non-linear workflows.

That explanation is so technical. Okay, let me explain intuitively. Imagine your project code is like a tree.

tree

Okay, let's dig deeper!

Creating a new project is like when we plant a new tree.

Little tree

For the first couple of commits, the Branch feature is not mandatory. Because we're not building complex features yet, We could commit straight to the main.

Tree's growing, the same as to our project. When our project gets bigger and more complex, for safety reasons, It would be good for us to use a git branch.

Crete a new specific branch → work on the branch → merge the branch to the main.

after the branch is merged into the main, The branch will become unused, I call it a dead-branch. So it's good for us to cut ( delete ) the unused branch, to make our tree looks aesthetic.

Git explanation

preference

https://en.wikipedia.org/wiki/Git

Top comments (0)