Chapter 1: GIT - Concepts

Chapter 1: GIT - Concepts

What is GIT?

GIT stands for?global?information?tracker

Git is a DevOps tool used for?source code management.

It is a?free and open-source version control system?used to?handle small to very large projects efficiently.

Git is used to?track changes in the source code, enabling multiple developers to work together?on non-linear development.

Developed by?Linus Torvalds in 2005 for the development of the Linux kernel.

Now, that you have understood with is GIT, let's understand the before and after the process of GIT's involvement in the project.

No alt text provided for this image
Before Git Process

Let's understand the challenges faced by the developers or the user.

  • Developers used to submit their codes to the central server without having copies of their own
  • Any changes made to the source code were unknown to the other developers
  • There was no communication between any of the developers

Now let’s look at the scenario after Git

  • Every developer has an entire copy of the code on their local systems
  • Any changes made to the source code can be tracked by others
  • There is regular communication between the developers

No alt text provided for this image
Git Working Process

Features of Git

  • Tracks history
  • Free and open source
  • Supports non-linear development
  • Creates backups
  • Scalable
  • Supports collaboration
  • Branching is easier
  • Distributed development

Git Workflow

No alt text provided for this image
Git Workflow

The Git workflow is divided into three states:

Working directory?- Modify files in your working directory

Staging area (Inde?- Stage the files and add snapshots of them to your staging area

Git directory (Repository)?- Perform a commit that stores the snapshots permanently in your Git directory. Check out any existing version, make changes, stage them and commit.

No alt text provided for this image
Git Workflow

Branch in Git

A branch in Git is used to keep your changes until they are ready. You can do your work on a branch while the main branch (master) remains stable. After you are done with your work, you can merge it with the main office.

No alt text provided for this image
Git Branch

  • The above diagram shows?there is a master branch.
  • There are two separate?branches called “small feature” and “large feature.”
  • Once you are finished working with the two separate branches, you can merge them and create a master branch.

Wrapping up

Git is a version control system used for tracking changes in computer files. It is generally used for source code management in software development.

Git is used to track changes in the source code The distributed version control tool is used for source code management It allows multiple developers to work together It supports non-linear development through its thousands of parallel branches.

Next Article, How to use Git & Git Hub with commands. | Stay Tuned | Like this article| Share this article | Follow me for more such small topics.

要查看或添加评论,请登录

社区洞察

其他会员也浏览了