What is GitHub?
GitHub is the world’s largest code hosting platform, built on Git version control.
Setup
sudo apt install git
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
ssh-keygen -t ed25519
# Add ~/.ssh/id_ed25519.pub to GitHub Settings → SSH Keys
Basic Workflow
git clone git@github.com:user/repo.git
git checkout -b feature/my-feature
git add . && git commit -m "feat: add feature"
git push origin feature/my-feature
# Create Pull Request on GitHub
Quick Reference
| Command | Purpose |
|---|---|
git status |
Check current state |
git log --oneline |
View commit history |
git diff |
View unstaged changes |
git stash |
Temporarily save changes |
git pull |
Fetch remote updates |