Git Complete Guide 🧠

Version Control System for Developers

1. What is Git?

Git is a version control system used to track code changes and collaborate with developers.

2. Why Git?

- Track code changes
- Work in teams
- Restore old versions
- Manage projects safely

3. Setup Git

Download Git:
https://git-scm.com

Check version:
git --version

4. Basic Commands

git init          → start repo
git add .         → add files
git commit -m ""  → save changes
git status        → check status

5. Branching

git branch feature
git checkout feature
git merge feature

6. GitHub Connection

git remote add origin URL
git push -u origin main
git pull origin main

7. Real Workflow

1. Write code
2. git add .
3. git commit -m "update"
4. git push

8. Important Files

.gitignore → ignore files
README.md  → project info

9. Real Use Cases