0% found this document useful (0 votes)
13 views7 pages

Setup GitHub 01

This document serves as an intuitive guide to Git and GitHub, explaining Git as a Version Control System that tracks changes and allows collaboration, while GitHub acts as a cloud-based storage for Git repositories. It provides practical steps for getting started with Git, including installation, setup, creating a repository, and basic commands for adding, committing, pushing, and pulling changes. The document emphasizes the importance of meaningful commit messages and offers real-life analogies to understand key concepts.

Uploaded by

22bph016
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views7 pages

Setup GitHub 01

This document serves as an intuitive guide to Git and GitHub, explaining Git as a Version Control System that tracks changes and allows collaboration, while GitHub acts as a cloud-based storage for Git repositories. It provides practical steps for getting started with Git, including installation, setup, creating a repository, and basic commands for adding, committing, pushing, and pulling changes. The document emphasizes the importance of meaningful commit messages and offers real-life analogies to understand key concepts.

Uploaded by

22bph016
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Github & Git- An Intuitive

Guide
Imagine you are writing a book with your friends. You start with a simple
draft, but soon, different people start editing it, adding new chapters, and
modifying existing ones. You need a system to track changes, merge
edits, and avoid conflicts. This is where Git and GitHub come in.
What is Git?

 Git is a Version Control System (VCS). It helps you:


• Track changes in your code.
• Restore previous versions if something breaks.
• Work in teams without messing up each other's code.
 Think of Git as a "time machine" for your code. If you make a
mistake, you can always go back to a previous version.
What is GitHub ?

 GitHub is an online platform that stores Git repositories. It allows:


• Collaboration with other developers.
• Remote storage of your code.
• Open-source contributions.
 💡 Git is the tool, GitHub is the cloud-based storage for Git
repositories.
 Think of Git as a "Time Machine" for Coding Projects , and
GitHub as a "Library of Code Repositories" 📚 stored in the cloud.
Key Git Concepts (Real-life
Analogies)
Getting Started With GitHub
 Install Git : Download Git (Check if it’s installed: git –version)
 Setup Git (First-time Only): Run these commands to setup your
username and email:
git config –global user.name ‘yourname’
git config –global user.email ‘defd’
 Create a Repository
mkdir MyFirstRepo # Create a new folder
cd MyFirstRepo # Move into the folder
git init # Initialize Git in this folder
 Add and Commit Changes (💡 Every commit should have a
meaningful message describing the changes.)
git add hello.txt
git commit -m "Added hello.txt file"
Getting Started
 Connect to GitHub and Push
- Link your local repository to GitHub:
git remote add origin https://github.com/YourUsername/MyFirstRepo.git
- Push your code to GitHub:
git push -u origin main
 Cloning an Existing Repository
- If you want to download a repository from GitHub:
git clone https://github.com/SomeUser/SomeRepo.git
 Pulling Latest Changes
- If SomeOne updates the repo and you want those changes:
git pull origin main
Git Commands Summary

You might also like