What is Git?
Git is a distributed version control system that allows multiple people to collaborate on projects and keep track of changes to their code. It helps in managing different versions of files, tracking modifications, and enabling teamwork without conflicts. With Git, you can easily undo changes, work on different features simultaneously, and merge contributions from multiple contributors. It's widely used in software development for efficient and organized project management.
What is Github?
GitHub is like a virtual space on the internet where people can save and manage their computer code. It helps teams of developers work together on projects by keeping track of changes, coordinating efforts, and providing a platform for sharing and collaborating on code. Think of it as a shared workspace for coding projects.
What is Version Control? How many types of version controls we have?
Version control, also known as source control or revision control, is a system that records changes to a file or a set of files over time so that you can recall specific versions later. It allows multiple contributors to work on a project simultaneously without interfering with each other. The primary goals of version control are to track changes, facilitate collaboration, and provide a history of project development.
Key features of version control include:
History Tracking: Version control systems (VCS) keep a detailed record of every change made to the project, including who made the change, when it was made, and what exactly was changed.
Collaboration: Multiple developers can work on the same project concurrently. Version control helps manage conflicts and merge changes made by different team members.
Branching and Merging: Developers can create branches to work on specific features or fixes independently. Later, these branches can be merged back into the main codebase.
Backup and Recovery: Version control provides a safety net by keeping a complete history of the project. In case of errors or mistakes, you can revert to a previous state.
Types of Version Control Systems:
There are two main types of version control systems:
Centralized Version Control System (CVCS):
In a CVCS, a central server stores the complete history of the project. Developers check out the latest version, make changes, and then commit those changes back to the central repository.
Examples of CVCS include CVS (Concurrent Versions System) and Subversion (SVN).
Distributed Version Control System (DVCS):
In a DVCS, each developer has a local copy of the entire project, including its complete history. This allows developers to work independently without requiring constant access to a central server.
Examples of DVCS include Git and Mercurial.
Commonly Used Version Control Systems:
Git: Widely adopted for its speed and flexibility, Git is a distributed version control system used by many open-source and private projects.
Subversion (SVN): A centralized version control system that tracks changes to files and directories over time.
Mercurial: Another distributed version control system that focuses on simplicity and ease of use.
✨Task:
Install Git on your computer (if it is not already installed). You can download it from the official website atgit-scm.com/downloads
I have installed Git on my laptop and screenshot below.
Create a free account on GitHub (if you don't already have one). You can sign up at github.com)
-
clone it to your local machine.
📌Make some changes to a file in the repository and commit them to the repository using Git.
📌Push the changes back to the repository on GitHub
-
Thank you for reading my blog. Don't forget to follow, comment and like my blog.