Skip to content

GitHub Repository & Pages Setup Guide

πŸ“‹ Prerequisites

  • Git installed on your machine
  • GitHub account created
  • Repository name chosen: VTG-Golf

πŸš€ Step 1: Configure Git Locally

# Set your Git username (one time per machine)
git config --global user.name "Your Name"
git config --global user.email "your-email@example.com"

# Verify configuration
git config --global --list

πŸ“ Step 2: Initialize Local Repository

# Navigate to project
cd "c:\Users\owest\Dev\GKIT-VTG-app"

# Initialize git
git init

# Check status
git status

Expected output:

On branch master

No commits yet

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        .env.local.template
        .gitignore
        INDEX.md
        ... (many more files)

nothing added to commit but untracked files present (use "git add")


πŸ“ Step 3: Add Files to Git

# Add all files
git add .

# Review files to be committed
git status

# Should show something like:
# On branch master
# Changes to be committed:
#   new file:   .env.local.template
#   new file:   .gitignore
#   new file:   INDEX.md
#   ... (many files)

βœ… Step 4: Create Initial Commit

git commit -m "Initial commit: VTG Firebase app with authentication and Firestore integration

- Added Firebase authentication (login/register)
- Integrated Firestore for data persistence
- Created protected routes with auth guards
- Implemented progress tracking
- Added comprehensive documentation
- Setup GitHub Pages with Jekyll
- Ready for Firebase project setup and deployment"

Check the commit:

git log --oneline
# Should show your initial commit


🌐 Step 5: Create GitHub Repository

  1. Go to GitHub
  2. Visit github.com/new
  3. Login if needed

  4. Create New Repository

  5. Repository name: VTG-Golf
  6. Description: Veien til Golf - Golf training application with Firebase, Angular, and Firestore
  7. Visibility: Public (required for GitHub Pages free tier)
  8. Important: Do NOT check "Initialize with README", "Add .gitignore", or "Choose a license"
  9. Click Create repository

  10. You'll see the setup page with commands


πŸ”— Step 6: Connect to GitHub

# Add GitHub as remote (replace YOUR_USERNAME)
git remote add origin https://github.com/YOUR_USERNAME/VTG-Golf.git

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

# Push to GitHub
git push -u origin main

# Expected output:
# Enumerating objects: 47, done.
# Counting objects: 100% (47/47), done.
# Delta compression using up to 8 threads
# Compressing objects: 100% (42/42), done.
# Writing objects: 100% (47/47), 156.78 KiB | 3.92 MiB/s, done.
# Total 47 (delta 0), reused 0 (delta 0), received 0 (delta 0)
# To https://github.com/YOUR_USERNAME/VTG-Golf.git
#  * [new branch]      main -> main
# Branch 'main' set to track remote branch 'main' from 'origin'.

Verify on GitHub: - Go to your new repository: https://github.com/YOUR_USERNAME/VTG-Golf - You should see all your files


πŸ“„ Step 7: Update Configuration Files

Update docs/_config.yml

Edit docs/_config.yml and replace the placeholders:

# Replace YOUR_USERNAME with your actual GitHub username
url: "https://YOUR_USERNAME.github.io/VTG-Golf"
baseurl: "/VTG-Golf"
repository: "YOUR_USERNAME/VTG-Golf"

# Optional: Update author info
author: "Your Name"
email: "your-email@example.com"

Commit Changes

git add docs/_config.yml
git commit -m "Update GitHub Pages configuration with correct URLs"
git push

🌐 Step 8: Enable GitHub Pages

  1. Go to Repository Settings
  2. Visit https://github.com/YOUR_USERNAME/VTG-Golf/settings
  3. Or: Repository β†’ Settings (gear icon) β†’ Pages (left sidebar)

  4. Configure GitHub Pages

  5. Source: Deploy from a branch
  6. Branch: main / docs folder
  7. Click Save

  8. GitHub Pages will build (takes 1-3 minutes)

  9. Look for green checkmark next to commit
  10. You'll see: "Your site is live at https://YOUR_USERNAME.github.io/VTG-Golf"

✨ Step 9: Create GitHub Pages Home Page

Create a nice landing page for GitHub Pages:

# Create README.md in project root if not exists
# This will show on your repository main page

Example README.md:

# 🏌️ Veien til Golf - VTG

A comprehensive golf training application built with **Angular 21.1** and **Firebase**.

## 🎯 Features

- πŸ” User authentication with Firebase
- πŸ“š Interactive course chapters
- 🏌️ GOBBS golf instruction technique
- πŸ“Š Progress tracking
- ☁️ Cloud-based with Firestore
- πŸ“± Responsive design with Tailwind CSS

## πŸš€ Quick Start

See [README_FIREBASE.md](README_FIREBASE.md) for setup instructions.

## πŸ“– Documentation

- [Quick Start](README_FIREBASE.md) - 5 minute setup
- [Firebase Setup](FIREBASE_SETUP.md) - Detailed configuration
- [Implementation Guide](IMPLEMENTATION_COMPLETE.md) - Full technical overview
- [Deployment Guide](DEPLOYMENT_GUIDE.md) - Deploy to production

## πŸ“Š Status

βœ… Code complete and tested
βœ… All documentation ready
⏳ Ready for Firebase project setup

## πŸ”§ Tech Stack

- **Frontend**: Angular 21.1, TypeScript, Tailwind CSS
- **Backend**: Firebase Auth, Firestore
- **Hosting**: Firebase Hosting + GitHub Pages

## πŸ“ License

MIT License - See LICENSE file for details

## πŸ‘€ Author

Your Name

## 🌐 Links

- **Documentation**: https://YOUR_USERNAME.github.io/VTG-Golf
- **App**: https://vtg-app.web.app (coming soon)
- **Repository**: https://github.com/YOUR_USERNAME/VTG-Golf

---

**Last Updated**: January 24, 2026

Commit and push:

git add README.md
git commit -m "Add project README with documentation links"
git push

πŸ” Step 10: Verify Everything

Check GitHub Repository

  • Visit: https://github.com/YOUR_USERNAME/VTG-Golf
  • Should see all files and README

Check GitHub Pages

  • Visit: https://YOUR_USERNAME.github.io/VTG-Golf
  • Should show your documentation site (might take a few minutes to appear)
  • Check that all links work

Verify Git Setup

# Check remote
git remote -v
# Should show:
# origin  https://github.com/YOUR_USERNAME/VTG-Golf.git (fetch)
# origin  https://github.com/YOUR_USERNAME/VTG-Golf.git (push)

# Check recent commits
git log --oneline
# Should show your commits

πŸ“‹ Ongoing Git Operations

Update Code and Push

# Make changes to files...

# Check what changed
git status

# Add changes
git add .

# Commit changes
git commit -m "Description of changes"

# Push to GitHub
git push

Pull Latest Changes (if working on multiple machines)

git pull

Create Feature Branches (for organized development)

# Create new branch
git checkout -b feature/new-feature

# Make changes, then commit
git add .
git commit -m "Add new feature"

# Push branch
git push -u origin feature/new-feature

# Create Pull Request on GitHub
# Then merge to main

🎯 GitHub Pages Customization (Optional)

Change Theme

Edit docs/_config.yml:

# Available themes:
# - jekyll-theme-slate (default)
# - jekyll-theme-cayman
# - jekyll-theme-dinky
# - jekyll-theme-minimal
# - jekyll-theme-tactile

theme: jekyll-theme-slate

Add Custom Domain (Optional)

  1. Go to Repository Settings β†’ Pages
  2. Under "Custom domain", enter your domain
  3. Update DNS settings with your registrar
  4. GitHub will handle SSL certificate automatically

Enable Discussions

  1. Repository β†’ Settings β†’ Discussions
  2. Enable discussions for users to ask questions

Enable GitHub Actions (Optional)

For automated testing and deployment:

Create .github/workflows/ci.yml:

name: CI

on: [push, pull_request]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v3
        with:
          node-version: '18'
      - run: npm install
      - run: npm run build

βœ… Checklist

  • [ ] Git configured locally
  • [ ] Repository initialized
  • [ ] Files staged and committed
  • [ ] GitHub repository created (Public)
  • [ ] Local repository connected to GitHub
  • [ ] Code pushed to GitHub
  • [ ] GitHub Pages enabled
  • [ ] docs/_config.yml updated
  • [ ] GitHub Pages site live
  • [ ] All links verified
  • [ ] README.md created

πŸ†˜ Troubleshooting

"Permission denied (publickey)"

Solution:

# Generate SSH key
ssh-keygen -t ed25519 -C "your-email@example.com"

# Add to SSH agent
ssh-add $env:USERPROFILE\.ssh\id_ed25519

# Add public key to GitHub:
# Settings β†’ SSH and GPG keys β†’ New SSH key
# Paste contents of $env:USERPROFILE\.ssh\id_ed25519.pub

"GitHub Pages not showing"

Solution: 1. Wait 3-5 minutes for first build 2. Check Settings β†’ Pages shows correct branch 3. Verify docs/_config.yml exists 4. Check that you have a docs/index.md or docs/README.md

Solution: 1. Verify baseurl in docs/_config.yml matches repo name 2. Use relative links: /path/to/file not c:\path\to\file 3. Test locally: jekyll serve


πŸš€ Next Steps

  1. Create Firebase Project
  2. Go to console.firebase.google.com
  3. Create "vtg-app" project
  4. Get Firebase config

  5. Setup .env.local

  6. Copy .env.local.template
  7. Add Firebase credentials

  8. Test Locally

  9. npm install
  10. npm run dev
  11. Test registration/login

  12. Deploy to Firebase Hosting

  13. firebase init
  14. npm run build
  15. firebase deploy

Status: 🟒 GitHub Repository & Pages Ready! Created: January 24, 2026 Time to Complete: ~10 minutes