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 tracking 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.
Let's understand the challenges faced by the developers or the user.
1. Developers used to submit their codes to the central server without having copies of their own
2. Any changes made to the source code were unknown to the other developers
3. There was no communication between any of the developers
Now let’s look at the scenario after Git
1. Every developer has an entire copy of the code on their local systems
2. Any changes made to the source code can be tracked by others
3. There is regular communication between the developers
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
The Git workflow is divided into three states:
Working directory - Modify files in your working directory
Staging area (Index) - 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.
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.
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.