Git and GitHub help you track code history, collaborate with others, and publish projects online.
- A version control system → tracks changes in code
- Allows you to undo mistakes, work with multiple versions
- A cloud service for hosting Git repositories
- Provides collaboration, issue tracking, pull requests, CI/CD
- Open GitHub Desktop → File → Clone Repository
- Paste repo link (e.g.,
https://github.com/user/repo.git) - Choose a local folder → Clone
- Edit files in your local editor (VS Code, etc.)
- GitHub Desktop will show changes under Changes
- Write a commit message → Click Commit to main
- Click Push origin → Uploads changes to GitHub
- If someone else updated repo → Click Fetch origin → Pull
Local PC <---clone--- GitHub Cloud Repo
↑ ↓
commit + push fetch + pull
- Clone = Download repo
- Commit = Save snapshot of code
- Push = Upload changes to GitHub
- Pull = Download latest changes