What is Version Control? Version control is a system that keeps track of changes to files over time. It allows multiple people to collaborate on a project, tracks who changed what and when, and lets you go back to an earlier version of the project if something goes wrong.
What is Version Control Used For? 1: Collaboration 2: Backup and Restore 3: Track changes 4: Experiment safely 5: Deployment
What is Git? Git is a popular version control system. It helps you manage code changes locally (on your own computer).
What is GitHub? GitHub is a cloud-based platform that hosts Git repositories. It’s like Dropbox for code, but with tools for collaboration.
Difference Between Git and GitHub
Git GitHub
A version control tool A hosting platform for Git On your local machine On the internet/cloud Track and manage code changes Share and collaborate on Git CLI/terminal-based Web interface + CLI No (works offline) Yes (to sync and collaborate)
Comprehensive Git and GitHub Setup for Beginners Step-by-Step Guide: A. Install Git Windows: Download from https://git-scm.com/
macOS/Linux: Use brew install git or sudo apt install git
B. Set up Git for First Time Open your terminal and type:
git config --global user.name "Your Name" git config --global user.email "you@example.com" C. Create a Local Repository
mkdir my_project cd my_project git init D. Create a GitHub Account Go to https://github.com/ and create an account.
E. Create a GitHub Repository Go to your GitHub dashboard
Click “New” to create a new repository
Give it a name (e.g., my_project)
You can make it public or private
Click “Create Repository”
F. Connect Local Repo to GitHub Back in terminal:
git remote add origin https://github.com/your-username/my_project.git G. First Commit and Push
echo git add README.md git commit -m "Initial commit" git push -u origin master