Skip to content

Latest commit

 

History

History
178 lines (130 loc) · 5.15 KB

File metadata and controls

178 lines (130 loc) · 5.15 KB

🚀 Upload to GitHub - Complete Guide

Follow these steps to upload your project to GitHub. I've already prepared everything locally!

✅ Step 1: Configure Git (One-Time Setup)

First, you need to tell git who you are. Run these commands:

# Set your name (replace with your actual name)
git config user.name "Your Name"

# Set your email (replace with your GitHub email)
git config user.email "your.email@example.com"

OR to set it globally for all repositories:

git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"

✅ Step 2: Create Initial Commit (Already Prepared!)

The files are already staged. You just need to commit:

git commit -m "Initial commit: Complete DineWise project with tests and documentation"

✅ Step 3: Create GitHub Repository

Option A: Using GitHub Website (Recommended)

  1. Go to GitHub.com and sign in
  2. Click the "+" icon in the top right → "New repository"
  3. Repository name: from-protege-to-production-python
  4. Description: From Protégé to Production: Integrating OWL Ontologies with Python using Owlready2 and Flask
  5. Choose Public (or Private if you prefer)
  6. DO NOT check "Initialize with README" (we already have one!)
  7. DO NOT add .gitignore or license (we have them)
  8. Click "Create repository"

Option B: Using GitHub CLI (If installed)

gh repo create from-protege-to-production-python --public --description "From Protégé to Production: Integrating OWL Ontologies with Python"

✅ Step 4: Connect Local Repository to GitHub

After creating the repository on GitHub, you'll see instructions. Use these commands:

# Replace YOUR_USERNAME with your GitHub username
git remote add origin https://github.com/YOUR_USERNAME/from-protege-to-production-python.git

# Rename branch to main (if needed)
git branch -M main

# Push to GitHub
git push -u origin main

If using SSH instead of HTTPS:

git remote add origin git@github.com:YOUR_USERNAME/from-protege-to-production-python.git
git branch -M main
git push -u origin main

✅ Step 5: Verify Upload

  1. Go to your repository page on GitHub
  2. Verify all files are visible:
    • ✅ README.md
    • ✅ QUICKSTART.md
    • ✅ All Python files
    • ✅ restaurant-ontology.owl
    • ✅ tests/ directory
    • ✅ LICENSE

✅ Step 6: Update Repository URLs in Documentation

After uploading, update the repository URLs in these files:

  1. README.md - Line 14: Replace <your-repository-url>
  2. QUICKSTART.md - Line 14: Replace <your-repository-url>

Then commit and push:

git add README.md QUICKSTART.md
git commit -m "Update repository URLs in documentation"
git push

✅ Step 7: Add Repository Details (Optional but Recommended)

  1. Add description on GitHub repository page
  2. Add topics: python, owl-ontology, owlready2, flask, rest-api, semantic-web, ontology-reasoning, tutorial
  3. Enable GitHub Actions (go to Actions tab and enable)
  4. Add website URL (if you have one)

🔐 Authentication

If git push asks for credentials:

Option 1: Personal Access Token (HTTPS)

  1. GitHub → Settings → Developer settings → Personal access tokens → Tokens (classic)
  2. Generate new token with repo scope
  3. Use token as password when pushing

Option 2: SSH Keys (Recommended)

  1. Generate SSH key: ssh-keygen -t ed25519 -C "your.email@example.com"
  2. Add to GitHub: Settings → SSH and GPG keys → New SSH key
  3. Use SSH URL for remote: git@github.com:USERNAME/REPO.git

🎯 Quick Commands Summary

# 1. Configure git (if not done)
git config user.name "Your Name"
git config user.email "your.email@example.com"

# 2. Create commit
git commit -m "Initial commit: Complete DineWise project with tests and documentation"

# 3. Add remote (after creating GitHub repo)
git remote add origin https://github.com/YOUR_USERNAME/from-protege-to-production-python.git

# 4. Push to GitHub
git branch -M main
git push -u origin main

✅ Success Checklist

  • Git user configured (name and email)
  • Initial commit created
  • GitHub repository created
  • Remote added
  • Code pushed to GitHub
  • All files visible on GitHub
  • Repository URLs updated in docs
  • Repository description added
  • Topics added

🐛 Troubleshooting

Problem: "Permission denied" when pushing

Solution: Use Personal Access Token or SSH keys (see Authentication section)

Problem: "Repository not found"

Solution: Check repository name and username are correct

Problem: "Updates were rejected"

Solution: If you made changes on GitHub, pull first:

git pull origin main --rebase
git push origin main

Problem: "Failed to push some refs"

Solution: Make sure branch is named main:

git branch -M main
git push -u origin main

📚 Need More Help?


You're almost there! Follow the steps above to complete the upload! 🚀