Lesson 1 of 10By Sayeda Haifa Perveez
Last updated on Jul 3, 202043567Git 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. Linus Torvalds created Git in 2005 for the development of the Linux kernel.
The following are the topics covered in this Git blog:
Learn the basics of Git VCS and understand how to setup Git in your system with the Git Training Course. Check out the course now.
Before diving deep, let’s explain a scenario before Git:
Now let’s look at the scenario after Git:
DevOps is a culture that allows the development and operations teams to work together. With this type of working environment, developers continuously develop and test codes, and there is continuous integration taking place throughout the lifecycle. The operations team continuously deploys the code to the production environment. DevOps allows for better collaboration, increased trust, and faster software releases.
Now that we know what DevOps is, let's move on to the tools used in DevOps.
Subversion (SVN), TFS, and Git are source code management or software configuration management tools (SCM) used for both the planning and coding of the software.
The diagram below shows there are three files in the local system. A snapshot of these files are stored in the remote repository as Version 1.
The following diagram includes a few changes:
There have been some changes to file 2 and is updated to file 2.1. This change is stored as Version 2 in the repository. VCS enables you to track the history of a file collection. Each version captures a snapshot of the files at a certain point in time, and the VCS allows you to switch between these versions.
Git is a version control system used for tracking changes in computer files. It is generally used for source code management in software development.
The Git workflow is divided into three states:
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.
This will lead you to the Git help page on the browser, which will display the following:
This will lead you to the Git help page on the browser, which will display the following:
The above command creates a branch.
The above command switches to the new branch from the master branch.
The above command creates and adds “info3.txt” to the first_branch.
The above command makes a commit to the first_branch.
The above command shows that the new branch has access to all the files.
The above command shows that the master branch does not have an “info3.txt” file.
The above command is used to merge “first_branch” with the master branch. Now, the master branch has “info3.txt” file.
I hope this blog helped you understand Git. You have learned all about before Git and after Git, what DevOps is and tools used in DevOps. You learned various essential topics, like version control systems, centralized version control systems, distributed version control systems, what exactly Git is, benefits of Git, Git workflow, branch in Git, commands in Git, and finally, you saw a demo on Git.
Git is just one tool used in DevOps. To get further training in Git, you can take up the Git Training Course or an elective course on it through Simplilearn’s DevOps Engineer Master’s Program. This comprehensive program provides you with all of the skills you’ll need and access to the most widely used DevOps tools through a combination of live, instructor-led classes, online self-paced learning, and hands-on projects. If you’re beginning or want to take your career to the next level, Simplilearn has something for all aspiring DevOps professionals. To learn more about what we’re up to, check out additional resources here.
Haifa Perveez is passionate about learning new technologies and working on them. She is an engineer who loves to travel, read and write. She's always curious about things and very determined to track the latest technologies and the trends that they are creating for the future.
DevOps Engineer
DevOps Certification Training
GIT Training
*Lifetime access to high-quality, self-paced e-learning content.
Explore CategoryHow to Become a DevOps Engineer?: Roles, Responsibilities, and Skills Required
DevOps Engineer Resume Guide
What is a DevOps Engineer? Salary, Roles and Responsibilities
What is DevOps: DevOps Core, Working, and Uses Explained
How to Become a Big Data Engineer?
DevOps Career Guide: A Comprehensive Playbook To Becoming A DevOps Engineer