1. What is Git?
Git is a Distributed Version Control System (DVCS) used to track changes in source code. It allows developers to:- Track file changes
- Restore previous versions
- Collaborate with others
- Manage different project versions
2. What is GitHub?
GitHub is a cloud platform that hosts Git repositories. It provides:- Cloud backup
- Collaboration
- Pull Requests
- Issues
- Code Review
- GitHub Actions (CI/CD)
([GitHub Docs][1])
3. Version Control System (VCS)
A Version Control System keeps track of every modification. Benefits:- Undo mistakes
- Track history
- Multiple developers can work together
- Backup
- Branching
4. Install Git
Download Git Windows: https://git-scm.com Verify installation5. Configure Git
6. Git Repository
A Repository (Repo) is a project folder tracked by Git. Types- Local Repository
- Remote Repository
7. Initialize Repository
8. Git Workflow
9. Git Status
- Modified files
- New files
- Deleted files
- Staged files
10. Git Add
Stage one file11. Git Commit
Save snapshot12. Git Log
Show commit history13. Clone Repository
Download GitHub project14. Remote Repository
Check remote15. Push
Upload code16. Pull
Download latest code17. Fetch
Download changes only18. Branch
Create branch19. Switch Branch
20. Create and Switch
21. Merge
Merge feature branch22. Merge Conflict
Occurs when two developers modify the same line. Resolve by:- Edit file
- Remove conflict markers
- Add file
- Commit
23. Git Ignore
Ignore files Example24. Remove File
25. Rename File
26. Undo Changes
Discard changes27. Reset
Soft28. Revert
Undo commit safely29. Stash
Save work temporarily30. Tags
Create31. Fork
Fork creates your own copy of another person’s GitHub repository. Used in Open Source.32. Pull Request (PR)
Request to merge code into another branch. Steps Fork ↓ Clone ↓ Create Branch ↓ Commit ↓ Push ↓ Open Pull Request ↓ Review ↓ Merge33. GitHub Issues
Used to:- Report bugs
- Request features
- Track tasks
34. README.md
Project documentation Contains- Project name
- Installation
- Usage
- Features
- License