GIT and GitHub-1
GIT and GitHub-1
Definition:
• Git is a distributed version control system.
• Tracks changes in files and folders over time.
• Allows you to revert back to previous versions.
Why Git?
• Saves a history of your work.
• Enables multiple people to work on the same project without
conflicts.
• Helps avoid the “final_final_final.docx” problem!
What is GitHub?
Definition:
• GitHub is a platform for hosting Git repositories in the cloud.
• Makes it easy to share your code and collaborate with others.
Key Features:
• Centralized code storage.
• Collaboration tools like pull requests and issues.
• Project management integrations.
Why Use Git and GitHub?
• For Individuals:
• Backup your work.
• Undo mistakes.
• Experiment safely with new ideas.
• For Teams:
• Collaborate on the same project efficiently.
• Track who made changes and why.
• Avoid overwriting each other’s work.
Installing Git
• Step 1: Download Git
Go to git-scm.com and download the version for your OS.
• Step 2: Install Git
Follow the setup wizard (default options are fine for beginners).
• Step 3: Verify Installation
Open a terminal or command prompt and run:
git --version
Configuring Git
git config --global user.name "Your Name"
git config --global user.email [email protected]
git status
git pull origin <branch-name>