#!/bin/bash

# Change to the website directory
cd /usr/www/amatsuro/manoktok.com

# Initialize git repository
git init

# Add GitHub repository as remote
git remote add origin https://github.com/manoktokchicken/manoktok.git

# Configure Git
git config user.name "Manoktok"
git config user.email "tlacson7@gmail.com"

# Fetch all branches
git fetch origin

# Reset to match origin/main exactly
git reset --hard origin/main

# Set proper permissions
chmod -R 755 .
chmod -R 775 uploads images logs

echo "Git repository initialized and synchronized!" 