📣What is Git?
Git is free and open-source 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.
📣What is Github?
GitHub is a web-based platform that provides hosting for version control using Git. It is a real-time collaboration encourages teams to work together to develop code, build web pages, and update content.
📣What is Version Control? How many types of version controls we have?
It is also known as source control or versioning, is the practice of tracking and managing changes to software code. It involves keeping a detailed account of every modification made to the code, ensuring that these changes are both trackable and reversible.
✦Two most popular types of version control systems are:
Centralized (CVCS)
Stores all the files in a central repository. Each user gets their own working copy, but there is just one central repository.
Distributed (DVCS)
Stores files across multiple repositories. With distributed version control, each team member makes changes to a local copy of the repository on their computer.
📣Why we use distributed version control over centralized version control?
Distributed version control provides more flexibility, better collaboration, and increased resilience compared to centralized version control. It's like having your own personal backup of the project, making collaboration smoother and reducing the risk of data loss. Overall the decentralized nature of a DVCS provide us greater collaboration, flexibility, and security, that's why it is a popular choice for many teams.
♢Tasks :
Install Git on your computer (if it is not installed).
Create a free account on GitHub.
🌐Exercises:
Create a new repository on GitHub and clone it to your local machine
✦Go to GitHub.
✦Log in to your account.
✦Click on the "+" sign in the top right corner and select "New repository".
✦Fill in the repository name, description, and other necessary details.
✦Optionally, initialize the repository with a README file.
Clone Repository on Local Machine
✦Install Git (if it's not Installed) -
sudo apt install git
✦ git clone <repository URL>
Make Changes to a File, Commit using Git
git status # View the changes git add <filename> # Stage the changes git commit -m "Your commit message here" # Commit the changes
Push the Changes
git push origin main # Push changes to 'main' branch.
Check your Github & Refresh it. Changes Reflected Successfully.♛
I trust this blog will be a valuable resource, unlocking fresh insights and enriching your knowledge. 🌟
📚 Happy Learning :)😊