Day8 : Basic Git and Git-Hub for DevOps engineer.

Day8 : Basic Git and Git-Hub for DevOps engineer.

ยท

3 min read

What is Git?

Git is a version control system that allows you to track changes to files and coordinate work on those files among multiple people. It is commonly used for software development, but it can be used to track changes to any set of files. ๐Ÿ”„

With Git, you can keep a record of who made changes to what part of a file, and you can revert back to earlier versions of the file if needed. Git also makes it easy to collaborate with others, as you can share changes and merge the changes made by different people into a single version of a file. ๐Ÿ‘ฅ

What is GitHub?

GitHub is a web-based platform that provides hosting for version control using Git. It is a subsidiary of Microsoft, and it offers all of the distributed version control and source code management (SCM) functionality of Git as well as adding its own features. GitHub is a very popular platform for developers to share and collaborate on projects, and it is also used for hosting open-source projects. ๐ŸŒ

What is Version Control? How many types of version controls do we have?

Version control is a system that tracks changes to a file or set of files over time so that you can recall specific versions later. It allows you to revert files back to a previous state, revert the entire project back to a previous state, compare changes over time, and more. ๐Ÿ“‚

There are two main types of version control systems: centralized version control systems and distributed version control systems.

  • Centralized Version Control (CVCS): Uses a central server to store all versions of a project's files. Examples include Subversion and Perforce. ๐ŸŽฏ

  • Distributed Version Control (DVCS): Allows developers to clone an entire repository, including the entire version history, making collaboration, speed, and flexibility more efficient. Examples include Git, Mercurial, and Darcs. ๐Ÿš€

Why do we use distributed version control over centralized version control?

  1. Better collaboration: In a DVCS, every developer has a full copy of the repository, making teamwork more seamless. ๐Ÿ‘ซ

  2. Improved speed: With a local copy, developers can perform version control actions faster. ๐ŸŽ๏ธ

  3. Greater flexibility: DVCS allows for offline work and sharing changes with specific team members. ๐ŸŒ

  4. Enhanced security: The decentralized nature makes DVCS more resistant to data loss. ๐Ÿ’ช

In addition to these advantages, Git offers several benefits that contribute to its widespread adoption in the software development community. ๐ŸŒโœจ

Exercises:

  1. Create a new repository on GitHub and clone it to your local machine

    to clone the repository on a local machine type git clone https://github.com/vaibhav-zingade26/devop_batch5.git

  2. Make some changes to a file in the repository and commit them to the repository using Git.

  3. Push the changes back to the repository on GitHub.

    see you on Day 9....๐Ÿ˜Š!!!!!

ย