cd C:\OOPS
git init
git add .
git commit -m "Java Learning Hub - Complete Educational Platform"Replace yourusername with your GitHub username:
git remote add origin https://github.com/yourusername/java-learning-hub.git
git branch -M main
git push -u origin main- Go to: https://github.com/yourusername/java-learning-hub/settings
- Click "Pages" in the left sidebar
- Under "Build and deployment":
- Source: Deploy from a branch
- Branch: main
- Folder: /docs
- Click Save
GitHub will deploy automatically (1-2 minutes). Your site will be live at:
https://yourusername.github.io/java-learning-hub/
- Repository created on GitHub
- Repository has
mainbranch -
/docsfolder exists - GitHub Pages is enabled
- Status shows "Your site is live"
- Can access site in browser
When you make changes:
# Make your changes in docs/ folder
# Then:
git add .
git commit -m "Update: Add new content"
git push origin main
# GitHub Actions will auto-deploy!# 1. Navigate to project
cd C:\OOPS
# 2. Check status
git status
# 3. Stage all changes
git add .
# 4. Commit changes
git commit -m "Java Learning Hub - Initial Release"
# 5. Push to GitHub
git push origin main
# 6. Check deployment status
# Go to: Settings > Pages (in your GitHub repo)After deployment, share these links:
| Page | URL |
|---|---|
| Homepage | https://yourusername.github.io/java-learning-hub/ |
| Java Basics | https://yourusername.github.io/java-learning-hub/java-basics/ |
| OOP | https://yourusername.github.io/java-learning-hub/oops/ |
| DSA | https://yourusername.github.io/java-learning-hub/dsa/ |
| Backend | https://yourusername.github.io/java-learning-hub/java-backend/ |
| Master AI | https://yourusername.github.io/java-learning-hub/master-ai/ |
| Resources | https://yourusername.github.io/java-learning-hub/resources.html |
Solution: Install Git from https://git-scm.com/
Solution: Set up SSH key or use GitHub CLI token
Solution:
- Wait 2-3 minutes
- Hard refresh (Ctrl+Shift+R)
- Check Status in Pages settings
Solution:
- Clear browser cache (Ctrl+Shift+Delete)
- Check if push was successful (
git status) - Wait a minute and refresh
-
Test Locally First
# Open in browser (Windows) start docs/index.html
-
View Git History
git log --oneline -
Undo Last Commit
git reset --soft HEAD~1
-
Create Custom Domain
- Buy domain name
- Add DNS records
- Update in GitHub Pages settings
- GitHub Docs: https://docs.github.com/en/pages
- Git Tutorial: https://git-scm.com/doc
- PowerShell: Built-in on Windows
You're deployed! Now share your hub with the world!